Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

clang HEAD 8.0.0 (https://github.com/llvm-mirror/clang.git 4d12ac09c5078ff950fa6fda4d7c2b3495e65408) (https://github.com/llvm-mirror/llvm.git d4b895e81949b2787b254837d6ff2a23f9b583c8)

Options
Warnings
Boost 1.69.0
C++2a(GNU)
no pedantic
Raw compiler options
-Wno-unused-value

Author

anonymous

over 6 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.69.0/clang-head/include -std=gnu++2a -Wno-unused-value
prog.cc:15:5: error: 'this' argument to member function 'smash' has type 'const Ming', but function is not marked const
    give_me_a<const Ming>().smash();   // ERROR: smashing a const prvalue is not allowed
    ^~~~~~~~~~~~~~~~~~~~~~~
prog.cc:4:10: note: 'smash' declared here
    void smash() {}
         ^
prog.cc:18:23: error: expression is not assignable
    give_me_a<char>() = 0;       // ERROR: assigning to a scalar prvalue is not allowed
    ~~~~~~~~~~~~~~~~~ ^
prog.cc:21:29: error: expression is not assignable
    give_me_a<const char>() = 0;       // ERROR: assigning to a scalar prvalue is not allowed
    ~~~~~~~~~~~~~~~~~~~~~~~ ^
3 errors generated.
Exit Code:
1