Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

gcc HEAD 10.0.0 20190825 (experimental)

Options
Warnings
Don't Use Boost
C++2a(GNU)
no pedantic
Raw compiler options
-fconcepts

Author

anonymous

over 6 years ago

$ g++ prog.cc -Wall -Wextra -std=gnu++2a -fconcepts
prog.cc: In function 'int main()':
prog.cc:20:8: error: cannot call function 'void d(auto:1&) [with auto:1 = void(int)]'
   20 |     d(g);
      |        ^
prog.cc:15:6: note:   constraints not satisfied
   15 | void d(es_llamable &) { std::cout << __PRETTY_FUNCTION__ << '\n'; }
      |      ^
prog.cc:4:14: note: within 'template<class T, class ... P> concept bool es_llamable() [with T = void(int); P = {}]'
    4 | concept bool es_llamable()
      |              ^~~~~~~~~~~
prog.cc:4:14: note:     with 'void (& t)(int)'
prog.cc:4:14: note: the required expression 't(p ...)' would be ill-formed
Exit Code:
1