Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ ../cpla.sh p178
- $ clang++ p178.cpp -std=c++03 -Wall
- p178.cpp:12:2: error: expected expression
- [[maybe_unused]] void f([[maybe_unused]] bool thing1,
- ^
- p1798.cpp:12:18: error: expected unqualified-id
- [[maybe_unused]] void f([[maybe_unused]] bool thing1,
- ^
- p178.cpp:21:3: error: use of undeclared identifier 'f'
- f(a,b);
- ^
- 3 errors generated.
- $ clang++ p178.cpp -std=c++2a -Wall
- b=1
- C++N4741(96)10.6.6 Maybe unused attribute [dcl.attr.unused]p178.cpp
- $ g++-8 p178.cpp -std=c++03 -Wall
- p178.cpp:12:1: error: expected unqualified-id before '[' token
- [[maybe_unused]] void f([[maybe_unused]] bool thing1,
- ^
- p178.cpp: In function 'int main()':
- p178.cpp:21:3: error: 'f' was not declared in this scope
- f(a,b);
- ^
- $ g++-8 p178.cpp -std=c++2a -Wall
- b=1
- C++N4741(96)10.6.7 Maybe unused attribute [dcl.attr.unused]p178.cpp
Add Comment
Please, Sign In to add comment