Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 5 years ago

Language

C++

Compiler

gcc HEAD 10.0.0 20191030 (experimental)

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

Author

anonymous

over 5 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.71.0/gcc-head/include -std=gnu++2a
prog.cc: In member function 'void Child::bar()':
prog.cc:10:17: error: 'int Grandparent::foo' is protected within this context
   10 |     void bar() {foo = 1;}
      |                 ^~~
prog.cc:3:9: note: declared protected here
    3 |     int foo = 0;
      |         ^~~
Exit Code:
1