💚 add trait for 128 bit integers

This commit is contained in:
Niels Lohmann
2020-07-13 13:46:56 +02:00
parent e3aace6dac
commit 0f1f5052bf
4 changed files with 25 additions and 15 deletions
-12
View File
@@ -101,17 +101,6 @@ TEST_CASE("Alternative number types")
// 128-bit arithmetic does not work with sanitizers
#if defined(__SIZEOF_INT128__) && !defined(__SANITIZE_ADDRESS__)
SECTION("type traits")
{
CHECK(std::is_integral<__int128_t>::value);
CHECK(std::is_integral<__uint128_t>::value);
CHECK(std::numeric_limits<__int128_t>::is_integer);
CHECK(std::numeric_limits<__uint128_t>::is_integer);
CHECK(std::is_convertible<std::int64_t, __int128_t>::value);
CHECK(std::is_convertible<std::uint64_t, __uint128_t>::value);
}
/*
SECTION("128 bit integers")
{
using json128 = nlohmann::basic_json<std::map, std::vector, std::string, bool, __int128_t, __uint128_t>;
@@ -136,6 +125,5 @@ TEST_CASE("Alternative number types")
CHECK(json128::parse(j_signed_min.dump()) == j_signed_min);
}
}
*/
#endif
}