Monday, September 7, 2009

MPL Terms

In case I need to look it later,(From C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond)

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