Internal(3) Library Functions Manual Internal(3)

# [NAME](#NAME)

Internal - Internal Functionality

# [SYNOPSIS](#SYNOPSIS)

## [Files](#Files)

file **helpers.hpp**  
Internal helper functionality. file **polymorphic\_impl.hpp**  
Internal polymorphism support. file **polymorphic\_impl\_fwd.hpp**  
Internal polymorphism support forward declarations. file **static\_object.hpp**  
Internal polymorphism static object support. file **traits.hpp**  
Internal type trait support. file **util.hpp**  
Internal misc utilities.

## [Classes](#Classes)

class **cereal::OutputArchive&lt; ArchiveType, Flags &gt;**  
The base output archive class. class **cereal::InputArchive&lt; ArchiveType, Flags &gt;**  
The base input archive class.

## [Macros](#Macros)

#define **CEREAL\_REGISTER\_ARCHIVE**(Archive)  
Registers a specific Archive type with cereal.

## [Enumerations](#Enumerations)

enum **cereal::Flags** { **AllowEmptyClassElision** = 1 }  
Special flags for archives.

## [Functions](#Functions)

std::uint8\_t **cereal::portable\_binary\_detail::is\_little\_endian** ()  
Returns true if the current machine is little endian. template&lt;std::size\_t DataSize&gt; void **cereal::portable\_binary\_detail::swap\_bytes** (std::uint8\_t \*data)  
Swaps the order of bytes for some chunk of memory. template&lt;class Archive, class T&gt; void **cereal::prologue** (Archive &, T const &)  
template&lt;class Archive, class T&gt; void **cereal::epilogue** (Archive &, T const &)

# [Detailed Description](#Detailed_Description)

Various classes and functions that are critical for the operation of cereal but of no interest to users

# [Macro Definition Documentation](#Macro_Definition_Documentation)

## [#define CEREAL\_REGISTER\_ARCHIVE( Archive)](#_define_CEREAL_REGISTER_ARCHIVE%28_Archive%29)

**Value:**

```
namespace cereal { namespace detail {                                 \
template <class T, class BindingTag>                                  \
typename polymorphic_serialization_support<Archive, T>::type          \
instantiate_polymorphic_binding( T*, Archive*, BindingTag, adl_tag ); \
} }
```

```

```

Registers a specific Archive type with cereal. This registration should be done once per archive. A good place to put this is immediately following the definition of your archive. Archive registration is only strictly necessary if you wish to support pointers to polymorphic data types. All archives that come with cereal are already registered.

# [Enumeration Type Documentation](#Enumeration_Type_Documentation)

## [enum **cereal::Flags**](#enum_)

Special flags for archives. AllowEmptyClassElision This allows for empty classes to be serialized even if they do not provide a serialization function. Classes with no data members are considered to be empty. Be warned that if this is enabled and you attempt to serialize an empty class with improperly formed serialize or load/save functions, no static error will occur - the error will propogate silently and your intended serialization functions may not be called. You can manually ensure that your classes that have custom serialization are correct by using the traits is\_output\_serializable and is\_input\_serializable in **cereal/details/traits.hpp**.

# [Function Documentation](#Function_Documentation)

## [template&lt;class Archive, class T&gt; void cereal::epilogue (Archive & , T const & ) \[inline\]](#template_class_Archive,_class_T__void_cereal::epilogue_%28Archive_&_,_T_const_&_%29)

Called after a type is serialized to tear down any special archive state for processing some type

## [template&lt;class Archive, class T&gt; void cereal::prologue (Archive & , T const & ) \[inline\]](#template_class_Archive,_class_T__void_cereal::prologue_%28Archive_&_,_T_const_&_%29)

Called before a type is serialized to set up any special archive state for processing some type

If designing a serializer that needs to set up any kind of special state or output extra information for a type, specialize this function for the archive type and the types that require the extra information.

## [template&lt;std::size\_t DataSize&gt; void cereal::portable\_binary\_detail::swap\_bytes (std::uint8\_t * data) \[inline\]](#template_std::size_t_DataSize__void_cereal::portable_binary_detail::swap_bytes_%28std::uint8_t_*_data%29)

Swaps the order of bytes for some chunk of memory.

**Parameters**

*data* The data as a uint8\_t pointer

**Template Parameters**

*DataSize* The true size of the data

# [Author](#Author)

Generated automatically by Doxygen for cereal from the source code.

Mon Oct 26 2026 20:39:03 cereal

---

Document: Internal(3) from cereal 1.3.2-r8 (Chainguard OS)
Source: https://github.com/USCiLab/cereal
