cereal::XMLOutputArchive::Options(3) Library Functions Manual cereal::XMLOutputArchive::Options(3)

# [NAME](#NAME)

cereal::XMLOutputArchive::Options - A class containing various advanced options for the XML archive.

# [SYNOPSIS](#SYNOPSIS)

#include &lt;/home/build/include/cereal/archives/xml.hpp&gt;

## [Public Member Functions](#Public_Member_Functions)

**Options** (int precision\_=std::numeric\_limits&lt; double &gt;::max\_digits10, bool indent\_=true, bool outputType\_=false, bool sizeAttributes\_=true)  
Specify specific options for the **XMLOutputArchive**.

**Option Modifiers**  
An interface for setting option settings analogous to named parameters.

```
cereal::XMLOutputArchive ar( myStream,


                             cereal::XMLOutputArchive::Options()


                             .indent(true)


                             .sizeAttributes(false) );
```

**Options** & **precision** (int value)  
Sets the precision used for floaing point numbers. **Options** & **indent** (bool enable)  
Whether to indent each line of XML. **Options** & **outputType** (bool enable)  
Whether to output the type of each serialized object as an attribute. **Options** & **sizeAttributes** (bool enable)  
Whether dynamically sized containers (e.g. vector) output the size=dynamic attribute.

## [Static Public Member Functions](#Static_Public_Member_Functions)

static **Options** **Default** ()  
Default options.

## [Friends](#Friends)

class **XMLOutputArchive**

# [Detailed Description](#Detailed_Description)

A class containing various advanced options for the XML archive.

**Options** can either be directly passed to the constructor, or chained using the modifier functions for an interface analogous to named parameters

# [Constructor & Destructor Documentation](#Constructor_&_Destructor_Documentation)

## [cereal::XMLOutputArchive::Options::Options (int precision_ = std::numeric\_limits&lt;double&gt;::max\_digits10, bool indent_ = true, bool outputType_ = false, bool sizeAttributes_ = true) \[inline\], \[explicit\]](#cereal::XMLOutputArchive::Options::Options_%28int_precision__=_)

Specify specific options for the **XMLOutputArchive**.

**Parameters**

*precision\_* The precision used for floating point numbers  
*indent\_* Whether to indent each line of XML  
*outputType\_* Whether to output the type of each serialized object as an attribute  
*sizeAttributes\_* Whether dynamically sized containers output the size=dynamic attribute

# [Author](#Author)

Generated automatically by Doxygen for cereal from the source code.

Mon Oct 26 2026 20:39:03 cereal

---

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