Author
anonymous
about 6 years ago
Language
C++
Compiler
gcc HEAD 10.0.0 20190507 (experimental)
Options
Warnings
Boost 1.67.0
C++2a(GNU)
no pedantic
Author
anonymous
about 6 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.67.0/gcc-head/include -std=gnu++2a
prog.cc: In function 'int main()':
prog.cc:36:63: error: no matching function for call to 'invoke(<unresolved overloaded function type>, std::tuple<A<int>, A<double> >)'
36 | auto a = invoke(make, std::make_tuple(A<int>{}, A<double>{}));
| ^
prog.cc:8:13: note: candidate: 'template<class F, long unsigned int ...Is, class Tuple> auto invoke(F&&, std::index_sequence<Is ...>, Tuple&&)'
8 | static auto invoke(F&& f, std::index_sequence<Is...>, Tuple&& t)
| ^~~~~~
prog.cc:8:13: note: template argument deduction/substitution failed:
prog.cc:36:63: note: 'std::tuple<A<int>, A<double> >' is not derived from 'std::integer_sequence<long unsigned int, Is ...>'
36 | auto a = invoke(make, std::make_tuple(A<int>{}, A<double>{}));
| ^
prog.cc:14:13: note: candidate: 'template<class F, class Tuple> auto invoke(F&&, Tuple&&)'
14 | static auto invoke(F&& f, Tuple&& t)
| ^~~~~~
prog.cc:14:13: note: template argument deduction/substitution failed:
prog.cc:36:63: note: couldn't deduce template parameter 'F'
36 | auto a = invoke(make, std::make_tuple(A<int>{}, A<double>{}));
| ^
In file included from /opt/wandbox/gcc-head/include/c++/10.0.0/pstl/glue_algorithm_defs.h:13,
from /opt/wandbox/gcc-head/include/c++/10.0.0/algorithm:71,
from prog.cc:4:
/opt/wandbox/gcc-head/include/c++/10.0.0/functional:78:5: note: candidate: 'template<class _Callable, class ... _Args> std::invoke_result_t<_Callable, _Args ...> std::invoke(_Callable&&, _Args&& ...)'
78 | invoke(_Callable&& __fn, _Args&&... __args)
| ^~~~~~
/opt/wandbox/gcc-head/include/c++/10.0.0/functional:78:5: note: template argument deduction/substitution failed:
prog.cc:36:63: note: couldn't deduce template parameter '_Callable'
36 | auto a = invoke(make, std::make_tuple(A<int>{}, A<double>{}));
| ^
Exit Code:
1