Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 3 years ago

Language

C++

Compiler

gcc HEAD 13.0.0 20220907 (experimental)

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

Author

anonymous

about 3 years ago

$ g++ prog.cc -Wall -Wextra -std=gnu++2a
prog.cc:13:2:   in 'constexpr' expansion of '<lambda closure object><lambda()>().<lambda()>()'
prog.cc:11:31: error: the value of 'notInitialized' is not usable in a constant expression
   11 |     int notInitialized = demo(notInitialized);
      |                               ^~~~~~~~~~~~~~
prog.cc:11:9: note: 'int notInitialized' is not const
   11 |     int notInitialized = demo(notInitialized);
      |         ^~~~~~~~~~~~~~
Exit Code:
1