Author
anonymous
about 5 years ago
Language
Compiler
Options
Author
anonymous
about 5 years ago
$
prog.cc: In function 'int main()':
prog.cc:10:44: error: cannot capture '{std::as_const<std::vector<int> >(vec)}' by reference
10 | [&coll{std::as_const(vec)}] { // ERROR???
| ^
prog.cc: In lambda function:
prog.cc:12:37: error: 'coll' was not declared in this scope
12 | for (int elem : coll) {
| ^~~~
Exit Code:
1