| static_object.hpp(3) | Library Functions Manual | static_object.hpp(3) |
NAME
static_object.hpp - Internal polymorphism static object support.
SYNOPSIS
#include 'cereal/macros.hpp'
Classes
class cereal::detail::StaticObject< T >
A static, pre-execution object. class cereal::detail::StaticObject< T
>::LockGuard
A class that acts like std::lock_guard.
Macros
#define CEREAL_DLL_EXPORT __attribute__
((visibility('default')))
Prevent link optimization from removing non-referenced static objects. #define
CEREAL_USED __attribute__ ((__used__))
Variables
template<class T> T &
cereal::detail::StaticObject< T >::instance =
StaticObject<T>::create()
Detailed Description
Internal polymorphism static object support.
Macro Definition Documentation
#define CEREAL_DLL_EXPORT __attribute__ ((visibility('default')))
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)
Author
Generated automatically by Doxygen for cereal from the source code.
| Sat Aug 29 2026 00:42:30 | cereal |