30#ifndef CEREAL_TYPES_BASE_CLASS_HPP_
31#define CEREAL_TYPES_BASE_CLASS_HPP_
38 namespace base_class_detail
43 template <class Base, class Derived, bool IsPolymorphic = std::is_polymorphic<Base>::value>
52 template <
class Base,
class Derived>
102 template<
class Derived>
103 base_class(Derived
const * derived) :
104 base_ptr(
const_cast<Base*
>(
static_cast<Base
const *
>(derived)))
106 static_assert( std::is_base_of<Base, Derived>::value,
"Can only use base_class on a valid base class" );
107 base_class_detail::RegisterPolymorphicBaseClass<Base, Derived>::bind();
190 template<
class Derived>
191 virtual_base_class(Derived
const * derived) :
192 base_ptr(
const_cast<Base*
>(
static_cast<Base
const *
>(derived)))
194 static_assert( std::is_base_of<Base, Derived>::value,
"Can only use virtual_base_class on a valid base class" );
195 base_class_detail::RegisterPolymorphicBaseClass<Base, Derived>::bind();
Internal polymorphism support forward declarations.
Definition base_class.hpp:45
static PolymorphicCaster const * bind()
Performs registration (binding) between Base and Derived.
Definition polymorphic_impl.hpp:450
Common base type for base class casting.
Definition traits.hpp:1167
Internal type trait support.