Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 6 years ago

Language

C++

Compiler

clang 7.0.0

Options
Warnings
Don't Use Boost
C++11
no pedantic

Author

anonymous

about 6 years ago

$ clang++ prog.cc -Wall -Wextra -std=c++11
prog.cc:16:6: error: 'global' cannot be captured because it does not have automatic storage duration
    [global] { ++global; } ();
     ^
prog.cc:6:5: note: 'global' declared here
int global = 10;
    ^
1 error generated.
Exit Code:
1