MPL11
 All Classes Namespaces Files Typedefs Macros Groups Pages
List of all members
boost::mpl11::instantiate< Typeclass > Struct Template Reference

Holds default methods of typeclasses. More...

#include <boost/mpl11/fwd/core.hpp>

Detailed Description

template<template< typename...> class Typeclass>
struct boost::mpl11::instantiate< Typeclass >

Holds default methods of typeclasses.

This should be specialized for typeclasses wishing to provide a default implementation for some methods. Usage:

template <>
struct SomeTypeclass<MyDatatype>
: instantiate<SomeTypeclass>::with<MyDatatype>
{
// ...
};

Hence, typeclasses should provide their default methods in the nested with member template. instantiate<...>::with<...> should always inherit from true_; specializations of instantiate should conserve that. The primary instantiate template provides a member template with<...> equivalent to true_.