HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EsfFixedSizePolymorphicHolder< Base, BufferSize >::Compatibility Struct Reference

#include <fixedSizePolymorphicHolder.h>

Static Public Member Functions

template<class Derived >
static bool HasBaseAtSameAddress (const Derived &derived)
 

Static Public Attributes

template<class Derived >
static constexpr bool FITS_IN_BUFFER = sizeof(Derived) <= BufferSize
 
template<class Derived >
static constexpr bool DERIVES_FROM_BASE
 
template<class Derived >
static constexpr bool HAS_ALIGNMENT
 

Detailed Description

template<class Base, size_t BufferSize = sizeof(Base)>
struct EsfFixedSizePolymorphicHolder< Base, BufferSize >::Compatibility

Checks if instances of Derived can be stored in this holder.

If any member of this class is false, then instances of Derived cannot be stored in this holder. These checks are made public for testing.

Definition at line 190 of file fixedSizePolymorphicHolder.h.

Member Function Documentation

template<class Base , size_t BufferSize>
template<class Derived >
bool EsfFixedSizePolymorphicHolder< Base, BufferSize >::Compatibility::HasBaseAtSameAddress ( const Derived &  derived)
static

Verifies that a Derived instance has the same address as its Base.

This check would fail for certain cases of multiple-inheritance. C++ does not currently allow checking this at compile-time, so this check can only happen at runtime.

Definition at line 268 of file fixedSizePolymorphicHolder.h.

Member Data Documentation

template<class Base, size_t BufferSize = sizeof(Base)>
template<class Derived >
constexpr bool EsfFixedSizePolymorphicHolder< Base, BufferSize >::Compatibility::DERIVES_FROM_BASE
static
Initial value:
=
std::is_base_of_v<Base, Derived>

Definition at line 196 of file fixedSizePolymorphicHolder.h.

template<class Base, size_t BufferSize = sizeof(Base)>
template<class Derived >
constexpr bool EsfFixedSizePolymorphicHolder< Base, BufferSize >::Compatibility::FITS_IN_BUFFER = sizeof(Derived) <= BufferSize
static

Definition at line 193 of file fixedSizePolymorphicHolder.h.

template<class Base, size_t BufferSize = sizeof(Base)>
template<class Derived >
constexpr bool EsfFixedSizePolymorphicHolder< Base, BufferSize >::Compatibility::HAS_ALIGNMENT
static
Initial value:
=
alignof(Derived) == _REQUIRED_ALIGNMENT

Definition at line 200 of file fixedSizePolymorphicHolder.h.


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