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', "");
std::size_t count = 0u;
auto i = s.rbegin();
for( ; i != s.rend(); ++i, --i, i++, i--, i+=1, i-=1, i+=1 ) {
- if (' ' == *i)
+ if (' ' == *i) {
++count;
+ }
}
return count;
}