Language
C++
Compiler
clang 8.0.0
Options
Warnings
Boost 1.70.0
C++17
-pedantic-errors
$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/clang-8.0.0/include -std=c++17 -pedantic-errors
Exit Code:
1
Author
anonymous
almost 6 years ago
C++
clang 8.0.0
Author
anonymous
almost 6 years ago
$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/clang-8.0.0/include -std=c++17 -pedantic-errors
prog.cc:6:22: error: reference to local variable 'one' declared in enclosing function '__closure_first::operator()<int>'
return ((one * two) + ...);
^
prog.cc:8:16: note: in instantiation of function template specialization '__closure_first::operator()(int &&)::(anonymous class)::operator()<int &>' requested here
return second(one...);
^
prog.cc:15:17: note: in instantiation of function template specialization '__closure_first::operator()<int>' requested here
return first(5);
^
prog.cc:3:31: note: 'one' declared here
auto operator()(Args&&... one) const
^
1 error generated.