Language
C++
Compiler
gcc 12.1.0
Options
Warnings
Don't Use Boost
C++11
-pedantic-errors
#include <vector>
struct hoge {
};
struct SMyStruct {
hoge StructElement1;
};
int main() {
std::vector<SMyStruct> myVec;
myVec.push_back(SMyStruct());
for( auto elem : myVec )
auto local1 = elem.StructElement1;
}
$ g++ prog.cc -Wall -Wextra -std=c++11 -pedantic-errors
Exit Code:
0