title: Can't serialize std::vector with Cereal
body: <p>I'm new to serialization, and I'm having trouble serializing <code>std::vector</code> objects with the <a href="http://uscilab.github.io/cereal/" rel="nofollow noreferrer">Cereal library</a>. Here's a sample that illustrates the problem:</p>
  
  <pre><code>class MyClass
  {
      int x, y, z;
  
      class MyOtherClass
      {
          string name, description;
  
      public:
  
          template&lt;class Archive&gt;
          void serialize(Archive &amp; archive)
          {
              archive(name, description);
          }
      };
  
      vector&lt;MyOtherClass&gt; Victor;
      vector&lt;int&gt; ints;
  
  public: 
  
      template&lt;class Archive&gt;
      void serialize(Archive &amp; archive)
      {
          archive(x, y, z, ints); // error C2338: cereal could not find any output serialization functions for the provided type and archive combination.
      }
  };
  </code></pre>
  
  <p>Attempting to serialize either the <code>ints</code> object or the <code>Victor</code> object results in <code>error C2338: cereal could not find any output serialization functions for the provided type and archive combination.</code></p>
  
  <p>Here's the code I use in the <code>main</code> function:</p>
  
  <pre><code>MyClass MyObject;
  ofstream datafile(path, ios::binary);
  { cereal::BinaryOutputArchive oarchive(datafile); oarchive(MyObject); }
  </code></pre>
  
  <p>What am I doing wrong?</p>