C++ Actor Framework 0.19
No Matches
Public Types | List of all members
caf::extend< Base, Derived > Struct Template Reference

Allows convenient definition of types using mixins. More...

#include <extend.hpp>

Public Types

template<template< class, class > class... Mixins>
using with = typename detail::extend_helper< Derived, Base, Mixins... >::type
 Identifies the combined type.

Detailed Description

template<class Base, class Derived = Base>
struct caf::extend< Base, Derived >

Allows convenient definition of types using mixins.

For example, extend<one, T>::with<two, three> is an alias for three<two<one, T>, T>.

Mixins always have two template parameters: base type and derived type. This allows mixins to make use of the curiously recurring template pattern (CRTP). However, if none of the used mixins use CRTP, the second template argument can be ignored (it is then set to Base).

The documentation for this struct was generated from the following file: