Language
C++
Compiler
gcc HEAD 13.0.0 20220907 (experimental)
Options
Warnings
Don't Use Boost
C++2a(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -std=gnu++2a
Exit Code:
1
Author
anonymous
about 3 years ago
C++
gcc HEAD 13.0.0 20220907 (experimental)
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);
| ^~~~~~~~~~~~~~