XCode
XCodeでテンプレートクラスを作ったらハマったのでメモ /*test.h*/ template <class T> class Test { public: T max(T a, T b); }; /*test.cpp*/ template <classT> T Test<T>::max(T a, T b) { if(a < b) return b; return a; } このように実装ファイル側で実装部を書くと Undef</t></classt></class>…
XCodeでテンプレートクラスを作ったらハマったのでメモ /*test.h*/ template <class T> class Test { public: T max(T a, T b); }; /*test.cpp*/ template <classT> T Test<T>::max(T a, T b) { if(a < b) return b; return a; } このように実装ファイル側で実装部を書くと Undef</t></classt></class>…