Summary:
Exposed by the latest clang:
```lang=bash
folly/test/FixedStringTest.cpp:52:36: error: unused variable 's' [-Werror,-Wunused-variable]
constexpr folly::FixedString<42> s{"hello world"};
^
folly/gen/test/StringBenchmark.cpp:176:15: error: unused variable 'line' [-Werror,-Wunused-variable]
StringPiece line(kLine);
^
```
Reviewed By: yfeldblum
Differential Revision:
D6264853
fbshipit-source-id:
5cf4b0a8c99eaa31c2499746c70ddc49fdd73074
BENCHMARK_RELATIVE(StringUnsplit_Gen, iters) {
size_t s = 0;
- StringPiece line(kLine);
while (iters--) {
fbstring joined = from(testStrVector) | unsplit(',');
s += joined.size();
TEST(FixedStringCtorTest, FromLiterals) {
constexpr folly::FixedString<42> s{"hello world"};
+ static_assert(s[0] == 'h', "");
constexpr folly::FixedString<11> s2{"hello world"};
static_assert(s2[0] == 'h', "");
static_assert(s2[10] == 'd', "");