File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -93,26 +93,20 @@ TEST(string_view_test, compare) {
9393}
9494
9595#if FMT_USE_CONSTEVAL
96- namespace {
97-
9896template <size_t N> struct fixed_string {
9997 char data[N] = {};
10098
10199 constexpr fixed_string (const char (&m)[N]) {
102- for (size_t i = 0 ; i != N; ++i) {
103- data[i] = m[i];
104- }
100+ for (size_t i = 0 ; i != N; ++i) data[i] = m[i];
105101 }
106102};
107103
108- } // namespace
109-
110104TEST (string_view_test, from_constexpr_fixed_string) {
111- static constexpr auto fs = fixed_string<5 >(" x={} " );
112- static constexpr auto fmt = fmt::string_view (fs.data );
113- EXPECT_EQ (fmt , " x={} " );
105+ static constexpr auto fs = fixed_string<4 >(" foo " );
106+ static constexpr auto sv = fmt::string_view (fs.data );
107+ EXPECT_EQ (sv , " foo " );
114108}
115- #endif
109+ #endif // FMT_USE_CONSTEVAL
116110
117111TEST (base_test, is_locking) {
118112 EXPECT_FALSE (fmt::detail::is_locking<const char (&)[3 ]>());
You can’t perform that action at this time.
0 commit comments