From: Tim Hanson Date: Thu, 3 Oct 2013 20:17:10 +0000 (-0700) Subject: Add MaxString<__uint128_t> X-Git-Tag: v0.22.0~855 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=14fde8ae9c20af82e0b134ba5245d28d032b5b44 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 --- 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;