Language
C++
Compiler
clang 16.0.4
Options
Warnings
Optimization
Boost 1.81.0
C++17(GNU)
no pedantic
$ clang++ prog.cc -Wall -Wextra -O2 -march=native -I/opt/wandbox/boost-1.81.0-clang-16.0.4/include -std=gnu++17
Exit Code:
1
Author
anonymous
2 months ago
C++
clang 16.0.4
Author
anonymous
2 months ago
$ clang++ prog.cc -Wall -Wextra -O2 -march=native -I/opt/wandbox/boost-1.81.0-clang-16.0.4/include -std=gnu++17
prog.cc:23:28: error: cannot cast 'C' to its private base class 'B'
B* b = static_cast<B*>(c);
^
prog.cc:16:11: note: implicitly declared private here
class C : B{
^
1 error generated.