From 14fde8ae9c20af82e0b134ba5245d28d032b5b44 Mon Sep 17 00:00:00 2001 From: Tim Hanson Date: Thu, 3 Oct 2013 13:17:10 -0700 Subject: [PATCH] Add MaxString<__uint128_t> Summary: For GCC 3.6+, define a template specialization for MaxString<__uint128_t>. @override-unit-failures Test Plan: Unit tests Reviewed By: andrei.alexandrescu@fb.com FB internal diff: D995290 --- folly/Conv.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/folly/Conv.cpp b/folly/Conv.cpp index 6dfede7c..4796e87a 100644 --- a/folly/Conv.cpp +++ b/folly/Conv.cpp @@ -46,6 +46,12 @@ static_assert(sizeof(unsigned long long) >= 8, "Wrong value for MaxString::value" ", please update."); +/* Test for GCC >= 3.6.0 */ +#if __GNUC__ > 3 || (__GNUC__ == 3 && (__GNUC_MINOR__ >= 6)) +template <> const char *const MaxString<__uint128_t>::value = + "340282366920938463463374607431768211455"; +#endif + inline bool bool_str_cmp(const char** b, size_t len, const char* value) { // Can't use strncasecmp, since we want to ensure that the full value matches const char* p = *b; -- 2.34.1