openframeworks + LLVM + -std=c++11 = …
ofでC++11のlambdaとか使いたいなー.
とか思ってLLVMの設定のC++ Language DialectをC++11 [-std=c++11] にしたらコンパイル通らない.
ofTypes.hで転ける.
なんでだと思って色々調べてたら
#if __cplusplus<201103L
using std::tr1::shared_ptr;
using std::tr1::weak_ptr;
using std::tr1::enable_shared_from_this;
#endif
の部分が良くないらしい.
-std=c++11にすると 201103L<=__cplusplus
になってるんだけどまだ名前空間としては std::tr1::shared_ptr
とかになってるらしい.
これ, ofのgithubにissue立てた方が良いのかな...?でもXcode+LLVMでしか調べてないので怖くて立てれない.
それよりも英語が怖くて立てれない.
give me english power...
追記:
取り敢えず
#if __cplusplus<201103L || defined(__clang__)
using std::tr1::shared_ptr;
using std::tr1::weak_ptr;
using std::tr1::enable_shared_from_this;
#endif
にして何とか.
追々記:
issue立ってた.
「clang __cplusplus 201103L shared_ptr」で検索したら一番上に出て来たからきっと俺と同じ様なことをやってたんだろうな...
https://github.com/openframeworks/openFrameworks/issues/2335
コメントを残す