From: Sven Over Date: Mon, 14 Mar 2016 18:43:33 +0000 (-0700) Subject: folly/portability/Constexpr.h: add missing include statement X-Git-Tag: 2016.07.26~443 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b1e0c2c8be1d8355617929df0acf618af30dc09c;p=folly.git folly/portability/Constexpr.h: add missing include statement Summary:This commit fixes compiler errors when Constexpr.h was included on gcc before cstring (or string.h) was included. Also, qualify the call to strlen with the std namespace. Reviewed By: yfeldblum Differential Revision: D3047417 fb-gh-sync-id: 7a50dac2e9449b149062896f34fa5e864f767943 shipit-source-id: 7a50dac2e9449b149062896f34fa5e864f767943 --- diff --git a/folly/portability/Constexpr.h b/folly/portability/Constexpr.h index 810f987a..7ea46300 100755 --- a/folly/portability/Constexpr.h +++ b/folly/portability/Constexpr.h @@ -18,6 +18,7 @@ #define FOLLY_CONSTEXPR_H_ #include +#include namespace folly { @@ -45,7 +46,7 @@ constexpr size_t constexpr_strlen(const char* s) { #elif defined(_MSC_VER) return s == nullptr ? 0 : constexpr_strlen_internal(s, 0); #else - return strlen(s); + return std::strlen(s); #endif } }