Fixed constexpr append in FixedString tests
Summary: [Folly] Fixed constexpr append in `FixedString` tests after {D15618465}. ``` folly/test/FixedStringTest.cpp: In member function 'virtual void FixedStringAssignTest_ConstexprAppendLiteral_Test::TestBody()': folly/test/FixedStringTest.cpp:360:3: error: non-constant condition for static assertion static_assert(constexpr_append_literal_test() == "hello world!", ""); ^~~~~~~~~~~~~ In file included from folly/Range.h:25:0, from folly/FixedString.h:33, from folly/test/FixedStringTest.cpp:20: folly/test/FixedStringTest.cpp:360:47: in constexpr expansion of 'constexpr_append_literal_test()' folly/test/FixedStringTest.cpp:355:18: in constexpr expansion of '#'result_decl' not supported by dump_expr#<expression error>.folly::BasicFixedString<char, 20>::append((& s[7]))' folly/FixedString.h:1277:48: in constexpr expansion of 'folly::constexpr_strlen<char>(that)' folly/portability/Constexpr.h:68:21: error: 'strlen((& s[7]))' is not a constant expression return std::strlen(s); ~~~~~~~~~~~^~~ ``` Reviewed By: simpkins Differential Revision: D15643402 fbshipit-source-id: c7e26a0c37c956300364c566f211c866985d9dc2
Showing
Please register or sign in to comment