C++相談室 part62
■ このスレッドは過去ログ倉庫に格納されています
0808デフォルトの名無しさん
2008/07/16(水) 21:45:11これくらいなら出来る
#include <boost/mpl/if.hpp>
#include <boost/type_traits/is_integral.hpp>
using namespace boost;
template<class T>
struct Y {};
template<class T>
struct Z {};
template<class T>
struct X {
typedef mpl::if_<is_integral<T>, Y<T>, Z<T> >::type type;
};
■ このスレッドは過去ログ倉庫に格納されています