metafunction
A metafunction is either
-
a class template, all of whose parameters are types
or
-
a class
with a publicly accessible nested result type called type.
metafunction class
A metafunction class is a class with a publicly accessible nested metafunction called apply.
e.g.
struct plus_f
{
template <class T1, class T2>
struct apply
{
typedef typename mpl::plus<T1,T2>::type type;
};
};
No comments:
Post a Comment