.TH "cereal::detail::OutputBindingCreator< Archive, T >::PolymorphicSharedPointerWrapper" 3 "Sat Oct 10 2026 08:08:15" "cereal" \" -*- nroff -*- .ad l .nh .SH NAME cereal::detail::OutputBindingCreator< Archive, T >::PolymorphicSharedPointerWrapper \- Holds a properly typed shared_ptr to the polymorphic type\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBPolymorphicSharedPointerWrapper\fP (T const *dptr)" .br .ti -1c .RI "std::shared_ptr< T const > const & \fBoperator()\fP () const" .br .RI "Get the wrapped shared_ptr */\&. " .in -1c .SH "Detailed Description" .PP .SS "template .br class cereal::detail::OutputBindingCreator< Archive, T >::PolymorphicSharedPointerWrapper"Holds a properly typed shared_ptr to the polymorphic type\&. .SH "Constructor & Destructor Documentation" .PP .SS "template \fBcereal::detail::OutputBindingCreator\fP< Archive, T >::PolymorphicSharedPointerWrapper::PolymorphicSharedPointerWrapper (T const * dptr)\fR [inline]\fP" Wrap a raw polymorphic pointer in a shared_ptr to its true type .PP The wrapped pointer will not be responsible for ownership of the held pointer so it will not attempt to destroy it; instead the refcount of the wrapped pointer will be tied to a fake 'ownership pointer' that will do nothing when it ultimately goes out of scope\&. .PP The main reason for doing this, other than not to destroy the true object with our wrapper pointer, is to avoid meddling with the internal reference count in a polymorphic type that inherits from std::enable_shared_from_this\&. .PP \fBParameters\fP .RS 4 \fIdptr\fP A void pointer to the contents of the shared_ptr to serialize .RE .PP .SH "Author" .PP Generated automatically by Doxygen for cereal from the source code\&.