OS Manuals

cereal_detail_StaticObject(3)

cereal::detail::StaticObject< T > - A static, pre-execution object.

cereal::detail::StaticObject< T >(3) Library Functions Manual cereal::detail::StaticObject< T >(3)

cereal::detail::StaticObject< T > - A static, pre-execution object.

#include </home/build/include/cereal/details/static_object.hpp>


class LockGuard
A class that acts like std::lock_guard.


static T & getInstance ()
static LockGuard lock ()
Attempts to lock this static object for the current scope.

class cereal::detail::StaticObject< T >"A static, pre-execution object.

This class will create a single copy (singleton) of some type and ensures that merely referencing this type will cause it to be instantiated and initialized pre-execution. For example, this is used heavily in the polymorphic pointer serialization mechanisms to bind various archive types with different polymorphic classes

Attempts to lock this static object for the current scope.

Note

This function is a no-op if cereal is not compiled with thread safety enabled (CEREAL_THREAD_SAFE = 1).

This function returns an object that holds a lock for this StaticObject that will release its lock upon destruction. This call will block until the lock is available.

Generated automatically by Doxygen for cereal from the source code.

Mon Oct 26 2026 02:55:37 cereal

cereal 1.3.2-r7 · enterprise-packages · ingested 2026-10-26