Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 3 years ago

Language

C++

Compiler

gcc HEAD 13.0.0 20220807 (experimental)

Options
Warnings
Don't Use Boost
C++2a
no pedantic

Author

anonymous

about 3 years ago

$ g++ prog.cc -Wall -Wextra -std=c++2a
prog.cc: In lambda function:
prog.cc:22:20: warning: unused variable 'v' [-Wunused-variable]
   22 |         for (auto& v : x) {}
      |                    ^
prog.cc: In instantiation of 'void urgh() [with T = std::vector<int>]':
prog.cc:29:27:   required from here
prog.cc:11:9: error: range-based 'for' expression of type 'const int []' has incomplete type
   11 |         for (auto& v : x) {}
      |         ^~~
Exit Code:
1