Skip to content

Commit

Permalink
qualify c++11 int types
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed May 19, 2014
1 parent d8df077 commit 62e7165
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/binary_visitor_test.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <cstdint>
#include <iostream>
#include <vector>
#include <thread>
Expand All @@ -24,18 +25,18 @@ struct string_to_number<double>
};

template <>
struct string_to_number<int64_t>
struct string_to_number<std::int64_t>
{
int64_t operator() (std::string const& str) const
std::int64_t operator() (std::string const& str) const
{
return std::stoll(str);
}
};

template <>
struct string_to_number<uint64_t>
struct string_to_number<std::uint64_t>
{
uint64_t operator() (std::string const& str) const
std::uint64_t operator() (std::string const& str) const
{
return std::stoull(str);
}
Expand Down Expand Up @@ -96,8 +97,7 @@ struct javascript_equal

int main (/*int argc, char** argv*/)
{
//typedef util::variant<int, std::string> variant_type;
typedef util::variant<bool, int64_t, uint64_t, double, std::string> variant_type;
typedef util::variant<bool, std::uint64_t, double, std::string> variant_type;
variant_type v0(3.14159);
variant_type v1(std::string("3.14159"));
variant_type v2(1ULL);
Expand Down

0 comments on commit 62e7165

Please sign in to comment.