Commit b1e0c2c8 authored by Sven Over's avatar Sven Over Committed by Facebook Github Bot 7

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
parent bddb362e
......@@ -18,6 +18,7 @@
#define FOLLY_CONSTEXPR_H_
#include <cstdint>
#include <cstring>
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
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment