2016-09-25から1日間の記事一覧
以下のような単純なクラスがある。 template<class _Tp> struct X{ X(const _Tp& x=0):value(x){} bool eq(const _Tp& x){return x==value;} private: const _Tp value; }; これを使う場合に、例えばintとlongを型として当てはめた場合、クラス自体の互換性を持つように</class>…
以下のような単純なクラスがある。 template<class _Tp> struct X{ X(const _Tp& x=0):value(x){} bool eq(const _Tp& x){return x==value;} private: const _Tp value; }; これを使う場合に、例えばintとlongを型として当てはめた場合、クラス自体の互換性を持つように</class>…