.TH "static_object.hpp" 3 "Sat Aug 29 2026 00:42:30" "cereal" \" -*- nroff -*- .ad l .nh .SH NAME static_object.hpp \- Internal polymorphism static object support\&. .SH SYNOPSIS .br .PP \fR#include 'cereal/macros\&.hpp'\fP .br .SS "Classes" .in +1c .ti -1c .RI "class \fBcereal::detail::StaticObject< T >\fP" .br .RI "A static, pre-execution object\&. " .ti -1c .RI "class \fBcereal::detail::StaticObject< T >::LockGuard\fP" .br .RI "A class that acts like std::lock_guard\&. " .in -1c .SS "Macros" .in +1c .ti -1c .RI "#define \fBCEREAL_DLL_EXPORT\fP __attribute__ ((visibility('default')))" .br .RI "Prevent link optimization from removing non-referenced static objects\&. " .ti -1c .RI "#define \fBCEREAL_USED\fP __attribute__ ((__used__))" .br .in -1c .SS "Variables" .in +1c .ti -1c .RI "template T & \fBcereal::detail::StaticObject< T >::instance\fP = \fBStaticObject\fP::create()" .br .in -1c .SH "Detailed Description" .PP Internal polymorphism static object support\&. .SH "Macro Definition Documentation" .PP .SS "#define CEREAL_DLL_EXPORT __attribute__ ((visibility('default')))" .PP Prevent link optimization from removing non-referenced static objects\&. Especially for polymorphic support, we create static objects which may not ever be explicitly referenced\&. Most linkers will detect this and remove the code causing various unpleasant runtime errors\&. These macros, adopted from Boost (see force_include\&.hpp) prevent this (C) Copyright 2002 Robert Ramey - http://www.rrsd.com \&. Use, modification and distribution is subject to the Boost Software License, Version 1\&.0\&. (See accompanying file LICENSE_1_0\&.txt or copy at http://www.boost.org/LICENSE_1_0.txt) .SH "Author" .PP Generated automatically by Doxygen for cereal from the source code\&.