Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

gcc HEAD 9.0.0 20190101 (experimental)

Options
Warnings
Boost 1.68.0
C++2a(GNU)
no pedantic

Author

anonymous

over 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&);
      |          ^~~~~
Exit Code:
1