folly: accommodate fact that clang's strlen is not constexpr
authorJim Meyering <meyering@fb.com>
Tue, 8 Apr 2014 04:11:54 +0000 (21:11 -0700)
committerptarjan <ptarjan@fb.com>
Wed, 9 Apr 2014 03:59:38 +0000 (20:59 -0700)
Summary:
* folly/folly-config.h (FOLLY_HAVE_CONSTEXPR_STRLEN): Define to
zero when compiling with clang, since clang's strlen is not constexpr.

Test Plan:
Run this:
fbconfig --clang --with-project-version clang:dev folly/test && fbconfig dbg
and observe that the following no longer strikes:
folly/test/RangeTest.cpp:304:25: error: constexpr variable 'hello1' must be initialized by a constant expression

I also tried using clang-3.4 (the current default),
fbconfig --clang folly/test && fbmake dbg
with these results:
https://phabricator.fb.com/P8583443

Reviewed By: pgriess@fb.com

FB internal diff: D1262840


No differences found