2015-10-09から1日間の記事一覧

C++03 で has_xxx の実装

C++

久々に書いてみたら全然書き方覚えてなかったので覚書。 template<typename T> struct sfinae_helper{ typedef void type; }; template<typename T, typename U = void> struct has_xxx{ static bool const value = false; }; template<typename T> struct has_xxx<T, typename sfinae_helper<typename T::xxx>::type>{ static bool const value = tru…</t,></typename></typename></typename>