Language
C++
Compiler
gcc 7.3.0
Options
Warnings
Don't Use Boost
C++11(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -std=gnu++11
10
11
12
Exit Code:
0
Author
anonymous
about 6 years ago
C++
gcc 7.3.0
Author
anonymous
about 6 years ago
$ g++ prog.cc -Wall -Wextra -std=gnu++11
prog.cc: In function 'void bar()':
prog.cc:12:6: warning: capture of variable 'static_int' with non-automatic storage duration
[static_int] { ++static_int; } ();
^~~~~~~~~~
prog.cc:5:16: note: 'int static_int' declared here
static int static_int = 10;
^~~~~~~~~~
10
11
12