Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

5 months ago

Language

C++

Compiler

gcc HEAD 17.0.0 20260513 (experimental)

Options
Warnings
Don't Use Boost
C++2b(GNU)
no pedantic

Author

anonymous

5 months ago

$ g++ prog.cc -Wall -Wextra -std=gnu++2b
prog.cc: In function 'int main()':
prog.cc:28:30: error: call to consteval function 'std::basic_format_string<char, int>(g.FixedString<9>::sv())' is not a constant expression
   28 |   auto str = std::format(g.sv(), 50);
      |                          ~~~~^~
prog.cc:28:36: error: 'std::format_string<int>{std::basic_string_view<char>{8, ((const char*)(& g.FixedString<9>::data.std::array<char, 9>::_M_elems))}}' is not a constant expression
   28 |   auto str = std::format(g.sv(), 50);
      |                                    ^
prog.cc:28:36: error: 'std::basic_format_string<char, int>(g.FixedString<9>::sv())' is not a constant expression because it refers to an incompletely initialized variable
Exit Code:
1