Language
C++
Compiler
gcc HEAD 12.0.0 20210529 (experimental)
Options
Warnings
Boost 1.73.0
C++14
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-head/include -std=c++14
Exit Code:
1
Author
anonymous
over 4 years ago
C++
gcc HEAD 12.0.0 20210529 (experimental)
Author
anonymous
over 4 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-head/include -std=c++14
prog.cc: In member function 'void Derived::DerivedFunc(Base*)':
prog.cc:18:32: error: 'void Base::ProtectedBaseFunc()' is protected within this context
18 | base->ProtectedBaseFunc(); // コンパイルエラー
| ~~~~~~~~~~~~~~~~~~~~~~~^~
prog.cc:3:14: note: declared protected here
3 | void ProtectedBaseFunc() {}
| ^~~~~~~~~~~~~~~~~