Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 6 years ago

Language

C++

Compiler

clang HEAD 9.0.0 (https://github.com/llvm-mirror/clang.git cd1a1e62e2684a985f8e6ebcc40b67e5e7467a93) (https://github.com/llvm-mirror/llvm.git 0794ff58c3221f4dfcf38b835215d7e0b7f05c0e)

Options
Warnings
Boost 1.69.0
C++17
-pedantic-errors
Raw compiler options
-Wfatal-errors -Wno-gnu-zero-variadic-macro-arguments

Author

anonymous

almost 6 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.69.0/clang-head/include -std=c++17 -pedantic-errors -Wfatal-errors -Wno-gnu-zero-variadic-macro-arguments
prog.cc:8:12: fatal error: return type of virtual function 'setStrokeWidth' is not covariant with the return type of the function it overrides ('Circle &' is not derived from 'ElementBase &')
        Concrete &setStrokeWidth(int width) {
        ~~~~~~~~~~^
prog.cc:23:17: note: in instantiation of template class 'Element<Circle>' requested here
struct Circle : Element<Circle> {
                ^
prog.cc:2:23: note: overridden virtual function is here
        virtual ElementBase &setStrokeWidth(int width) = 0;
                ~~~~~~~~~~~~~^
1 error generated.
Exit Code:
1