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

MPLプレースホルダの簡単な実装

C++

struct _ {}; template <class F, class T1> struct apply; template <template <class> class F, class T1> struct apply<F<_>, T1> { typedef typename F<T1>::type type; }; #include <boost/type_traits/is_same.hpp> #include <boost/static_assert.hpp> template <class T> struct add_ptr { typedef T* type; }; typ…</class></boost/static_assert.hpp></boost/type_traits/is_same.hpp></t1></f<_></template></class>