uTL
micro Template library
crtp.h
Go to the documentation of this file.
1 
21 #ifndef __utl_impl_crtp_h__
22 #define __utl_impl_crtp_h__
23 
24 #include <utl/core/impl.h>
25 
35 namespace utl {
38  struct crtp_tag { };
40  struct virtual_tag { };
41 
43  #define _CRTP_IMPL(T) \
44  constexpr T& impl() { return *static_cast<T*>(this); } \
45  constexpr const T& impl() const { return *static_cast<const T*>(this); }
46 
47 }
49 #endif /* __utl_impl_crtp_h__ */
CRTP support tag type.
Definition: crtp.h:38
STL&#39;s core language concepts.
Definition: _1wire.h:30
virtual support tag type
Definition: crtp.h:40
Implementation detail main forward header.