after changing to XML "cereal could not find any output serialization functions"
<p>I want to serialize a Reconstruction class in a library called theia. The class Reconstruction does have a serialize function:</p>

<pre><code>friend class cereal::access;
  template &lt;class Archive&gt;
  void serialize(Archive&amp; ar) {  // NOLINT
    ar(next_track_id_,
       next_view_id_,
       view_name_to_id_,
       views_,
       tracks_);
  }
</code></pre>

<p>The serialization already in place works fine like this:</p>

<pre><code>Reconstruction estimated_reconstruction;

[...]
std::ofstream output_writer(output_file, std::ios::out | std::ios::binary);
cereal::PortableBinaryOutputArchive output_archive(output_writer);
 output_archive(estimated_reconstruction);
</code></pre>

<p>But when I change it to an XMLOutputArchive (adding the necessary #include) it doesn't work anymore!</p>

<pre><code>Reconstruction estimated_reconstruction;
[...]

std::ofstream output_writer(output_file, std::ios::out);
cereal::XMLOutputArchive output_archive(output_writer);
output_archive(estimated_reconstruction);
</code></pre>

<p>The error is the following one:</p>

<p>[...] </p>

<pre><code>error: static assertion failed: cereal could not find any output serialization functions for the provided type and archive combination.

 Types must either have a serialize function, load/save pair, or load_minimal/save_minimal pair (you may not mix these).
 Serialize functions generally have the following signature:

 template&lt;class Archive&gt;
   void serialize(Archive &amp; ar)
   {
     ar( member1, member2, member3 );
   }
</code></pre>