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>
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" );
190 template<
class 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" );
Internal polymorphism support forward declarations.
Definition: base_class.hpp:45
Casts a derived class to its non-virtual base class in a way that safely supports abstract classes.
Definition: base_class.hpp:101
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
Casts a derived class to its virtual base class in a way that allows cereal to track inheritance.
Definition: base_class.hpp:189
Internal type trait support.