Language
C++
Compiler
gcc 9.2.0
Options
Warnings
Don't Use Boost
C++17
-pedantic
$ g++ prog.cc -Wall -Wextra -std=c++17 -pedantic
Exit Code:
1
C++
gcc 9.2.0
$ g++ prog.cc -Wall -Wextra -std=c++17 -pedantic
prog.cc: In function 'int main()':
prog.cc:17:62: error: passing 'something' as 'this' argument discards qualifiers [-fpermissive]
17 | for( auto e : something { 1,2,3,4,5,6,7,8,9,0 }.get_vector() ) // get_vectorは内部に持つvectorへの参照を返す
| ^
prog.cc:10:24: note: in call to 'std::vector<int>& something::get_vector() &'
10 | std::vector < int >& get_vector() & { return ( _Value ); }
| ^~~~~~~~~~