2010-12-08から1日間の記事一覧

定数の has_xxx

C++

template<int N> struct sfinae_helper{ typedef void type; }; template<typename T, typename U = void> struct has_dimension_impl{ static const bool value = false; }; template<typename T> struct has_dimension_impl<T, typename sfinae_helper<T::dimension>::type>{ static const bool value = true; }; templat…</t,></typename></typename></int>