cereal::traits::is\_same\_archive&lt; ArchiveT, CerealArchiveT &gt;(3) Library Functions Manual cereal::traits::is\_same\_archive&lt; ArchiveT, CerealArchiveT &gt;(3)

# [NAME](#NAME)

cereal::traits::is\_same\_archive&lt; ArchiveT, CerealArchiveT &gt; - Checks if the provided archive type is equal to some cereal archive type.

# [SYNOPSIS](#SYNOPSIS)

#include &lt;/home/build/include/cereal/details/traits.hpp&gt;

Inherits std::integral\_constant&lt; bool, std::is\_same&lt; detail::decay\_archive&lt; ArchiveT &gt;, CerealArchiveT &gt;::value &gt;.

# [Detailed Description](#Detailed_Description)

## [template&lt;class ArchiveT, class CerealArchiveT&gt;](#template_class_ArchiveT,_class_CerealArchiveT_)

struct cereal::traits::is\_same\_archive&lt; ArchiveT, CerealArchiveT &gt;"Checks if the provided archive type is equal to some cereal archive type.

This automatically does things such as std::decay and removing any other wrappers that may be on the Archive template parameter.

Example use:

```
// example use to disable a serialization function
template <class Archive, EnableIf<cereal::traits::is_same_archive<Archive, cereal::BinaryOutputArchive>::value> = sfinae>
void save( Archive & ar, MyType const & mt );
```

# [Author](#Author)

Generated automatically by Doxygen for cereal from the source code.

Sat Aug 29 2026 00:42:30 cereal

---

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