.TH "memory.hpp" 3 "Mon Oct 26 2026 20:39:03" "cereal" \" -*- nroff -*- .ad l .nh .SH NAME memory.hpp \- Support for types found in \&. .SH SYNOPSIS .br .PP \fR#include 'cereal/cereal\&.hpp'\fP .br \fR#include \fP .br \fR#include \fP .br \fR#include 'cereal/types/polymorphic\&.hpp'\fP .br .SS "Classes" .in +1c .ti -1c .RI "struct \fBcereal::memory_detail::PtrWrapper< T >\fP" .br .RI "A wrapper class to notify cereal that it is ok to serialize the contained pointer\&. " .ti -1c .RI "struct \fBcereal::memory_detail::LoadAndConstructLoadWrapper< Archive, T >\fP" .br .RI "A struct that acts as a wrapper around calling load_andor_construct\&. " .ti -1c .RI "class \fBcereal::memory_detail::EnableSharedStateHelper< T >\fP" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "template \fBPtrWrapper\fP< T > \fBcereal::memory_detail::make_ptr_wrapper\fP (T &&t)" .br .RI "Make a \fBPtrWrapper\fP\&. " .ti -1c .RI "template void \fBcereal::memory_detail::loadAndConstructSharedPtr\fP (Archive &ar, T *ptr, std::true_type)" .br .ti -1c .RI "template void \fBcereal::memory_detail::loadAndConstructSharedPtr\fP (Archive &ar, T *ptr, std::false_type)" .br .ti -1c .RI "template std::enable_if::value, void >::type \fBcereal::CEREAL_SAVE_FUNCTION_NAME\fP (Archive &ar, std::shared_ptr< T > const &ptr)" .br .RI "Saving std::shared_ptr for non polymorphic types\&. " .ti -1c .RI "template std::enable_if::value, void >::type \fBcereal::CEREAL_LOAD_FUNCTION_NAME\fP (Archive &ar, std::shared_ptr< T > &ptr)" .br .RI "Loading std::shared_ptr, case when no user load and construct for non polymorphic types\&. " .ti -1c .RI "template std::enable_if::value, void >::type \fBcereal::CEREAL_SAVE_FUNCTION_NAME\fP (Archive &ar, std::weak_ptr< T > const &ptr)" .br .RI "Saving std::weak_ptr for non polymorphic types\&. " .ti -1c .RI "template std::enable_if::value, void >::type \fBcereal::CEREAL_LOAD_FUNCTION_NAME\fP (Archive &ar, std::weak_ptr< T > &ptr)" .br .RI "Loading std::weak_ptr for non polymorphic types\&. " .ti -1c .RI "template std::enable_if::value, void >::type \fBcereal::CEREAL_SAVE_FUNCTION_NAME\fP (Archive &ar, std::unique_ptr< T, D > const &ptr)" .br .RI "Saving std::unique_ptr for non polymorphic types\&. " .ti -1c .RI "template std::enable_if::value, void >::type \fBcereal::CEREAL_LOAD_FUNCTION_NAME\fP (Archive &ar, std::unique_ptr< T, D > &ptr)" .br .RI "Loading std::unique_ptr, case when user provides load_and_construct for non polymorphic types\&. " .ti -1c .RI "template void \fBcereal::CEREAL_SAVE_FUNCTION_NAME\fP (Archive &ar, \fBmemory_detail::PtrWrapper\fP< std::shared_ptr< T > const & > const &wrapper)" .br .RI "Saving std::shared_ptr (wrapper implementation)\&. " .ti -1c .RI "template std::enable_if< \fBtraits::has_load_and_construct\fP< T, Archive >::value, void >::type \fBcereal::CEREAL_LOAD_FUNCTION_NAME\fP (Archive &ar, \fBmemory_detail::PtrWrapper\fP< std::shared_ptr< T > & > &wrapper)" .br .RI "Loading std::shared_ptr, case when user load and construct (wrapper implementation)\&. " .ti -1c .RI "template std::enable_if::value, void >::type \fBcereal::CEREAL_LOAD_FUNCTION_NAME\fP (Archive &ar, \fBmemory_detail::PtrWrapper\fP< std::shared_ptr< T > & > &wrapper)" .br .RI "Loading std::shared_ptr, case when no user load and construct (wrapper implementation)\&. " .ti -1c .RI "template void \fBcereal::CEREAL_SAVE_FUNCTION_NAME\fP (Archive &ar, \fBmemory_detail::PtrWrapper\fP< std::unique_ptr< T, D > const & > const &wrapper)" .br .RI "Saving std::unique_ptr (wrapper implementation)\&. " .ti -1c .RI "template std::enable_if< \fBtraits::has_load_and_construct\fP< T, Archive >::value, void >::type \fBcereal::CEREAL_LOAD_FUNCTION_NAME\fP (Archive &ar, \fBmemory_detail::PtrWrapper\fP< std::unique_ptr< T, D > & > &wrapper)" .br .RI "Loading std::unique_ptr, case when user provides load_and_construct (wrapper implementation)\&. " .ti -1c .RI "template std::enable_if::value, void >::type \fBcereal::CEREAL_LOAD_FUNCTION_NAME\fP (Archive &ar, \fBmemory_detail::PtrWrapper\fP< std::unique_ptr< T, D > & > &wrapper)" .br .RI "Loading std::unique_ptr, case when no load_and_construct (wrapper implementation)\&. " .in -1c .SH "Detailed Description" .PP Support for types found in \&. .SH "Function Documentation" .PP .SS "template void cereal::memory_detail::loadAndConstructSharedPtr (Archive & ar, T * ptr, std::false_type )\fR [inline]\fP" Performs loading and construction for a shared pointer that is NOT derived from std::enable_shared_from_this .PP This is the typical case, where we simply pass the load wrapper to the archive\&. .PP \fBParameters\fP .RS 4 \fIar\fP The archive .br \fIptr\fP Raw pointer held by the shared_ptr .RE .PP .SS "template void cereal::memory_detail::loadAndConstructSharedPtr (Archive & ar, T * ptr, std::true_type )\fR [inline]\fP" Performs loading and construction for a shared pointer that is derived from std::enable_shared_from_this .PP \fBParameters\fP .RS 4 \fIar\fP The archive .br \fIptr\fP Raw pointer held by the shared_ptr .RE .PP .SH "Author" .PP Generated automatically by Doxygen for cereal from the source code\&.