Language
C++
Compiler
gcc HEAD 9.0.0 20190101 (experimental)
Options
Warnings
Boost 1.68.0
C++2a(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-head/include -std=gnu++2a
Exit Code:
1
Author
anonymous
about 6 years ago
C++
gcc HEAD 9.0.0 20190101 (experimental)
Author
anonymous
about 6 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-head/include -std=gnu++2a
prog.cc: In function 'void alice(const Ming&)':
prog.cc:7:9: error: binding reference of type 'Ming&' to 'const Ming' discards qualifiers
7 | bob(vase); // ERROR
| ^~~~
prog.cc:4:10: note: initializing argument 1 of 'void bob(Ming&)'
4 | void bob(Ming&);
| ^~~~~