Language
C++
Compiler
gcc 10.1.0
Options
Warnings
Boost 1.73.0
C++2a(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-10.1.0/include -std=gnu++2a
Exit Code:
1
Author
anonymous
about 4 years ago
C++
gcc 10.1.0
Author
anonymous
about 4 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-10.1.0/include -std=gnu++2a
prog.cc: In function 'int main()':
prog.cc:7:16: error: two consecutive '[' shall only introduce an attribute before '[' token
7 | std::cout << a[[](){ return 1; }()] << '\n';
| ^
prog.cc:7:35: error: expected primary-expression before ')' token
7 | std::cout << a[[](){ return 1; }()] << '\n';
| ^