ansi
フラグを使用した場合にのみポップアップする非常に奇妙なエラーに遭遇しました。
#include <memory>
class Test
{
public:
explicit Test(std::shared_ptr<double> ptr) {}
};
gcc 4.5.2および4.6.0(20101127)でテストされたコンパイルは次のとおりです。
g++ -std=c++0x -Wall -pedantic -ansi test.cpp
test.cpp:6:34: error: expected ')' before '<' token
しかし、作業なしでコンパイルし-ansi
ます。なんで?