supereight
Public Member Functions | List of all members
se::crtp< crtpType, T > Struct Template Reference

helper class for static_cast removal. More...

#include <setup_util.hpp>

Public Member Functions

T & underlying ()
 
const T & underlying () const
 

Detailed Description

template<typename crtpType, typename T>
struct se::crtp< crtpType, T >

helper class for static_cast removal.

See crtp-static-cast-replacement-*.png for inherintance. See: https://www.fluentcpp.com/2017/05/19/crtp-helper/

Template Parameters
crtpTypeThis avoids the diamond shape if two classes are the Base of the same T. This way every crtp class unique.
TThe type of the Derived class

Member Function Documentation

◆ underlying() [1/2]

template<typename crtpType , typename T >
T& se::crtp< crtpType, T >::underlying ( )
inline

◆ underlying() [2/2]

template<typename crtpType , typename T >
const T& se::crtp< crtpType, T >::underlying ( ) const
inline

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