NDDEM
Classes | Functions
cereal::memory_detail Namespace Reference

Classes

struct  PtrWrapper
 A wrapper class to notify cereal that it is ok to serialize the contained pointer. More...
 
struct  LoadAndConstructLoadWrapper
 A struct that acts as a wrapper around calling load_andor_construct. More...
 
class  EnableSharedStateHelper
 

Functions

template<class T >
PtrWrapper< T > make_ptr_wrapper (T &&t)
 Make a PtrWrapper. More...
 
template<class Archive , class T >
void loadAndConstructSharedPtr (Archive &ar, T *ptr, std::true_type)
 
template<class Archive , class T >
void loadAndConstructSharedPtr (Archive &ar, T *ptr, std::false_type)
 

Function Documentation

◆ loadAndConstructSharedPtr() [1/2]

template<class Archive , class T >
void cereal::memory_detail::loadAndConstructSharedPtr ( Archive &  ar,
T *  ptr,
std::false_type   
)
inline

Performs loading and construction for a shared pointer that is NOT derived from std::enable_shared_from_this

This is the typical case, where we simply pass the load wrapper to the archive.

Parameters
arThe archive
ptrRaw pointer held by the shared_ptr

◆ loadAndConstructSharedPtr() [2/2]

template<class Archive , class T >
void cereal::memory_detail::loadAndConstructSharedPtr ( Archive &  ar,
T *  ptr,
std::true_type   
)
inline

Performs loading and construction for a shared pointer that is derived from std::enable_shared_from_this

Parameters
arThe archive
ptrRaw pointer held by the shared_ptr

◆ make_ptr_wrapper()

template<class T >
PtrWrapper<T> cereal::memory_detail::make_ptr_wrapper ( T &&  t)
inline

Make a PtrWrapper.