Language
C++
Compiler
gcc HEAD 11.0.0 20200824 (experimental)
Options
Warnings
Optimization
Boost 1.73.0
C++17
no pedantic
$ g++ prog.cc -Wall -Wextra -O2 -march=native -I/opt/wandbox/boost-1.73.0/gcc-head/include -std=c++17
Exit Code:
1
Author
anonymous
about 5 years ago
C++
gcc HEAD 11.0.0 20200824 (experimental)
Author
anonymous
about 5 years ago
$ g++ prog.cc -Wall -Wextra -O2 -march=native -I/opt/wandbox/boost-1.73.0/gcc-head/include -std=c++17
prog.cc: In function 'int main()':
prog.cc:27:10: error: no match for call to '(Foo<int>) (int)'
27 | foo(1);
| ^
prog.cc:12:5: note: candidate: 'template<class ... Args> Foo<T>::operator Test<Args ...>() [with Args = {Args ...}; T = int]'
12 | operator Test<Args...>() {
| ^~~~~~~~
prog.cc:12:5: note: template argument deduction/substitution failed:
prog.cc:27:10: note: mismatched types 'Args' and 'int'
27 | foo(1);
| ^