cereal
A C++11 library for serialization
|
Go to the documentation of this file.
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" );
203 #endif // CEREAL_TYPES_BASE_CLASS_HPP_
Common base type for base class casting.
Definition: traits.hpp:1167
Internal polymorphism support forward declarations.
Casts a derived class to its non-virtual base class in a way that safely supports abstract classes.
Definition: base_class.hpp:100
Definition: base_class.hpp:44
static const PolymorphicCaster * bind()
Performs registration (binding) between Base and Derived.
Definition: polymorphic_impl.hpp:450
Internal type trait support.
Casts a derived class to its virtual base class in a way that allows cereal to track inheritance.
Definition: base_class.hpp:188