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)
commitbfdcbc20197ed2b2dbcd9a4f17c0cb1a665d62a1
treec23f5bc092031978494df8718851ac49e8abc894
parent8e82fd3453e34da1fe504e5f716a9a268d4e7aae
folly: accommodate fact that clang's strlen is not constexpr

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