qb
2.0.0.0
C++17 Actor Framework
|
Base class for implementing the Curiously Recurring Template Pattern (CRTP). More...
#include <type_traits.h>
Public Member Functions | |
T & | impl () noexcept |
Access the derived class instance. | |
T const & | impl () const noexcept |
Access the derived class instance (const version) |
Base class for implementing the Curiously Recurring Template Pattern (CRTP).
This class provides helper methods impl() to safely cast the base class pointer/reference to the derived class type T. This is the core mechanism of CRTP, enabling static polymorphism and code reuse by allowing base classes to access members of their derived classes.
T | The derived class type that inherits from crtp<T>. |
|
inlinenoexcept |
Access the derived class instance.
|
inlinenoexcept |
Access the derived class instance (const version)