Language
C++
Compiler
gcc HEAD 9.0.1 20190304 (experimental)
Options
Warnings
Boost 1.69.0
C++17
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.69.0/gcc-head/include -std=c++17
Exit Code:
1
Author
anonymous
about 6 years ago
C++
gcc HEAD 9.0.1 20190304 (experimental)
Author
anonymous
about 6 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.69.0/gcc-head/include -std=c++17
prog.cc: In function 'int main()':
prog.cc:36:14: error: no match for call to '(CompositeVisitor<>) (Foo&)'
36 | visitor(foo);
| ^
prog.cc:37:14: error: no match for call to '(CompositeVisitor<>) (Bar&)'
37 | visitor(bar);
| ^
prog.cc:38:14: error: no match for call to '(CompositeVisitor<>) (Baz&)'
38 | visitor(baz);
| ^
prog.cc: In instantiation of 'CompositeVisitor<Functors>::CompositeVisitor(Args&& ...) [with Args = {main()::<lambda(const auto:1&)>, main()::<lambda(const Bar&)>}; Functors = {}]':
prog.cc:30:3: required from here
prog.cc:11:72: error: mismatched argument pack lengths while expanding 'Functors'
11 | CompositeVisitor(Args&&... args) : Functors{std::forward<Args>(args)}...
| ^~~