Language
C++
Compiler
gcc HEAD 9.0.0 20180428 (experimental)
Options
Warnings
Boost 1.67.0
C++2a(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.67.0/gcc-head/include -std=gnu++2a
Exit Code:
1
C++
gcc HEAD 9.0.0 20180428 (experimental)
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.67.0/gcc-head/include -std=gnu++2a
prog.cc: In function 'int main()':
prog.cc:14:23: error: passing 'const Integer' as 'this' argument discards qualifiers [-fpermissive]
static_assert(x.get() == 3, "x value must be 3");
^
prog.cc:7:17: note: in call to 'constexpr int Integer::get()'
constexpr int get()
^~~