boost\_variant.hpp(3) Library Functions Manual boost\_variant.hpp(3)

# [NAME](#NAME)

boost\_variant.hpp - Support for boost::variant.

# [SYNOPSIS](#SYNOPSIS)

#include 'cereal/cereal.hpp'  
#include &lt;boost/variant/variant\_fwd.hpp&gt;  
#include &lt;boost/variant/static\_visitor.hpp&gt;

## [Classes](#Classes)

struct **cereal::boost\_variant\_detail::variant\_save\_visitor&lt; Archive &gt;**  
struct **cereal::boost\_variant\_detail::LoadAndConstructLoadWrapper&lt; Archive, T &gt;**  
struct **cereal::boost\_variant\_detail::load\_variant\_wrapper&lt; boost::detail::variant::void_ &gt;**  
Avoid serializing variant void_ type. struct **cereal::boost\_variant\_detail::load\_variant\_wrapper&lt; T &gt;**

## [Macros](#Macros)

#define **CEREAL\_CONSTEXPR\_LAMBDA** constexpr

## [Functions](#Functions)

template&lt;class Archive, typename ... VariantTypes&gt; void **cereal::CEREAL\_SAVE\_FUNCTION\_NAME** (Archive &ar, boost::variant&lt; VariantTypes... &gt; const &variant)  
Saving for boost::variant. template&lt;class Archive, typename ... VariantTypes&gt; void **cereal::CEREAL\_LOAD\_FUNCTION\_NAME** (Archive &ar, boost::variant&lt; VariantTypes... &gt; &variant)  
Loading for boost::variant.

# [Detailed Description](#Detailed_Description)

Support for boost::variant.

# [Author](#Author)

Generated automatically by Doxygen for cereal from the source code.

Sat Oct 10 2026 08:08:15 cereal

---

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