libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
Loading...
Searching...
No Matches
gimbal::PrimitiveCompatible< P, CRTP > Class Template Reference
Inheritance diagram for gimbal::PrimitiveCompatible< P, CRTP >:
gimbal::PrimitiveBase< GblType > gimbal::PrimitiveBase< GblTypeFlags > gimbal::PrimitiveBase< GblVersion > gimbal::Type gimbal::TypeFlags gimbal::Version gimbal::BoolType gimbal::CharType gimbal::DoubleType gimbal::EnumType gimbal::FlagsType gimbal::FloatType gimbal::IVariantType gimbal::Int16Type gimbal::Int32Type gimbal::Int64Type gimbal::InterfaceType gimbal::InvalidType gimbal::NilType gimbal::PointerType gimbal::StaticType< P, C, I > gimbal::StringType gimbal::Uint16Type gimbal::Uint32Type gimbal::Uint64Type gimbal::Uint8Type

Public Member Functions

constexpr const P * primitive_cast (void) const noexcept
 
constexpr operator P () const noexcept
 
constexpr P * operator& (void) noexcept
 
constexpr const P * operator& (void) const noexcept
 

Static Public Member Functions

template<typename T >
static constexpr std::enable_if_t< std::same_as< T, P >, P * > primitive_cast (CRTP *pDerived) noexcept
 

Detailed Description

template<typename P, typename CRTP>
class gimbal::PrimitiveCompatible< P, CRTP >

Definition at line 28 of file gimbal_decls.hpp.

Member Function Documentation

◆ primitive_cast() [1/2]

template<typename P , typename CRTP >
template<typename T >
static constexpr std::enable_if_t< std::same_as< T, P >, P * > gimbal::PrimitiveCompatible< P, CRTP >::primitive_cast ( CRTP *  pDerived)
inlinestaticconstexprnoexcept

Definition at line 36 of file gimbal_decls.hpp.

36{ return &*static_cast<ThisType*>(pDerived); }

◆ primitive_cast() [2/2]

template<typename P , typename CRTP >
constexpr const P * gimbal::PrimitiveCompatible< P, CRTP >::primitive_cast ( void  ) const
inlineconstexprnoexcept

Definition at line 38 of file gimbal_decls.hpp.

38{ return reinterpret_cast<const P*>(derived()->getPrimitiveAddress()); }

◆ operator P()

template<typename P , typename CRTP >
constexpr gimbal::PrimitiveCompatible< P, CRTP >::operator P ( ) const
inlineconstexprnoexcept

Definition at line 40 of file gimbal_decls.hpp.

40{ return static_cast<P>(derived()->getPrimitiveValue()); }

◆ operator&() [1/2]

template<typename P , typename CRTP >
constexpr P * gimbal::PrimitiveCompatible< P, CRTP >::operator& ( void  )
inlineconstexprnoexcept

Definition at line 41 of file gimbal_decls.hpp.

41{ return static_cast<P*>(derived()->getPrimitiveAddress()); }

◆ operator&() [2/2]

template<typename P , typename CRTP >
constexpr const P * gimbal::PrimitiveCompatible< P, CRTP >::operator& ( void  ) const
inlineconstexprnoexcept

Definition at line 42 of file gimbal_decls.hpp.

42{ return static_cast<const P*>(derived()->getPrimitiveAddress()); }

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