Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 6 years ago

Language

C++

Compiler

gcc 9.1.0

Options
Warnings
Boost 1.70.0
C++2a
-pedantic-errors
Raw compiler options
-fconcepts

Author

anonymous

about 6 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/gcc-9.1.0/include -std=c++2a -pedantic-errors -fconcepts
prog.cc: In function 'int main()':
prog.cc:31:12: error: cannot call function 'void foo(T&) [with T = Bad]'
   31 |     foo(bad);  // does not compile
      |            ^
prog.cc:21:6: note:   constraints not satisfied
   21 | void foo(T&)
      |      ^~~
prog.cc:21:6: note:     with 'Bad& a'
prog.cc:21:6: note:     with 'const Bad& b'
prog.cc:21:6: note:     with 'uint32_t i'
prog.cc:21:6: note: the required expression 'a.Update(i)' would be ill-formed
Exit Code:
1