Language
C++
Compiler
gcc HEAD 10.0.0 20191119 (experimental)
Options
Warnings
Boost 1.71.0
C++2a(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.71.0/gcc-head/include -std=gnu++2a
Exit Code:
1
Author
anonymous
over 5 years ago
C++
gcc HEAD 10.0.0 20191119 (experimental)
Author
anonymous
over 5 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.71.0/gcc-head/include -std=gnu++2a
prog.cc: In lambda function:
prog.cc:15:25: error: invalid use of 'auto'
15 | requires ([]{return true ;}())
| ^~~~
prog.cc:15:25: error: could not convert 'true' from 'bool' to 'auto'
prog.cc: In function 'int main()':
prog.cc:22:13: error: use of function 'void h() [with T = void]' with unsatisfied constraints
22 | h<void>() ; // unsatisfied constraint
| ^
prog.cc:16:6: note: declared here
16 | void h() { }
| ^
prog.cc:16:6: note: constraints not satisfied
prog.cc: In lambda function:
prog.cc:16:6: required by the constraints of 'template<class T> requires (<lambda>)() void h()'
prog.cc:15:25: error: invalid use of 'auto'
15 | requires ([]{return true ;}())
| ^~~~
prog.cc:15:25: error: could not convert 'true' from 'bool' to 'auto'
prog.cc: In lambda function:
prog.cc:15:25: error: invalid use of 'auto'
prog.cc:15:25: error: could not convert 'true' from 'bool' to 'auto'