cereal.hpp(3) Library Functions Manual cereal.hpp(3)

# [NAME](#NAME)

cereal.hpp - Main cereal functionality.

# [SYNOPSIS](#SYNOPSIS)

#include &lt;type\_traits&gt;  
#include &lt;string&gt;  
#include &lt;memory&gt;  
#include &lt;functional&gt;  
#include &lt;unordered\_map&gt;  
#include &lt;unordered\_set&gt;  
#include &lt;vector&gt;  
#include &lt;cstddef&gt;  
#include &lt;cstdint&gt;  
#include 'cereal/macros.hpp'  
#include 'cereal/details/traits.hpp'  
#include 'cereal/details/helpers.hpp'  
#include 'cereal/types/base\_class.hpp'  
#include 'cereal/types/common.hpp'

## [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\_NVP**(T)  
Creates a name value pair for the variable T with the same name as the variable. #define **CEREAL\_REGISTER\_ARCHIVE**(Archive)  
Registers a specific Archive type with cereal. #define **CEREAL\_UNUSED\_FUNCTION** static void unused() { (void)version; }  
Helper macro to omit unused warning. #define **CEREAL\_CLASS\_VERSION**(TYPE, VERSION\_NUMBER)  
Defines a class version for some type. #define [**PROCESS\_IF**(name)](/man/enterprise-packages/cereal/PROCESS_IF.name)  
Helper macro that expands the requirements for activating an overload. #define [**PROCESS\_IF**(name)](/man/enterprise-packages/cereal/PROCESS_IF.name)  
Helper macro that expands the requirements for activating an overload.

## [Enumerations](#Enumerations)

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

## [Functions](#Functions)

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)

Main cereal functionality.

# [Macro Definition Documentation](#Macro_Definition_Documentation)

## #define PROCESS\_IF( name)

**Value:**

```
traits::EnableIf<traits::has_##name<T, ArchiveType>::value,                           \


                 !traits::has_invalid_input_versioning<T, ArchiveType>::value,        \


                 (traits::is_input_serializable<T, ArchiveType>::value &&             \


                  (traits::is_specialized_##name<T, ArchiveType>::value ||            \


                   !traits::is_specialized<T, ArchiveType>::value))> = traits::sfinae
```

```

```

Helper macro that expands the requirements for activating an overload. Requirements: Has the requested serialization function Does not have version and unversioned at the same time Is output serializable AND is specialized for this type of function OR has no specialization at all

Requirements: Has the requested serialization function Does not have version and unversioned at the same time Is input serializable AND is specialized for this type of function OR has no specialization at all

## #define PROCESS\_IF( name)

**Value:**

```
traits::EnableIf<traits::has_##name<T, ArchiveType>::value,                          \


                 !traits::has_invalid_output_versioning<T, ArchiveType>::value,      \


                 (traits::is_output_serializable<T, ArchiveType>::value &&           \


                  (traits::is_specialized_##name<T, ArchiveType>::value ||           \


                   !traits::is_specialized<T, ArchiveType>::value))> = traits::sfinae
```

```

```

Helper macro that expands the requirements for activating an overload. Requirements: Has the requested serialization function Does not have version and unversioned at the same time Is output serializable AND is specialized for this type of function OR has no specialization at all

Requirements: Has the requested serialization function Does not have version and unversioned at the same time Is input serializable AND is specialized for this type of function OR has no specialization at all

# [Author](#Author)

Generated automatically by Doxygen for cereal from the source code.

Sat Oct 10 2026 08:08:15 cereal

---

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