Language
C++
Compiler
gcc HEAD 9.0.0 20190115 (experimental)
Options
Warnings
Optimization
Boost 1.69.0
C++17
no pedantic
$ g++ prog.cc -Wall -Wextra -O2 -march=native -I/opt/wandbox/boost-1.69.0/gcc-head/include -std=c++17
Exit Code:
1
Author
anonymous
over 6 years ago
C++
gcc HEAD 9.0.0 20190115 (experimental)
Author
anonymous
over 6 years ago
$ g++ prog.cc -Wall -Wextra -O2 -march=native -I/opt/wandbox/boost-1.69.0/gcc-head/include -std=c++17
prog.cc: In function 'int32_t main()':
prog.cc:50:6: error: cannot convert 'main()::<lambda(comp_a&, comp_c&)>' to 'storage<20, comp_a, comp_b, comp_c>::identity<std::function<void()> >::type' {aka 'std::function<void()>'}
50 | });
| ^
prog.cc:35:82: note: initializing argument 2 of 'void storage<size, Cs>::get(size_t, typename storage<size, Cs>::identity<std::function<void(Ts& ...)> >::type) [with Ts = {}; long unsigned int size = 20; Cs = {comp_a, comp_b, comp_c}; size_t = long unsigned int; typename storage<size, Cs>::identity<std::function<void(Ts& ...)> >::type = std::function<void()>]'
35 | void get(size_t index, typename identity<std::function<void(Ts& ...)>>::type f)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^