title: Compilation error with boost serialization
body: <p>I created a small sample for testing the boost serialization library, but I have a compilation problem.</p>
  
  <p>First of all, here's the code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;iomanip&gt;
  #include &lt;boost/filesystem/operations.hpp&gt;
  #include &lt;boost/serialization/nvp.hpp&gt;
  #include &lt;boost/filesystem/fstream.hpp&gt;
  #include &lt;boost/archive/xml_iarchive.hpp&gt;
  #include &lt;boost/archive/xml_oarchive.hpp&gt;
  #include &lt;boost/archive/binary_oarchive.hpp&gt;
  #include &lt;boost/archive/binary_iarchive.hpp&gt;
  #include &lt;boost/serialization/utility.hpp&gt;
  #include &lt;boost/serialization/list.hpp&gt;
  #include &lt;boost/serialization/version.hpp&gt;
  
  std::vector&lt;uint8_t&gt; buf;
  
  class MyClass
  {
  public:
      MyClass(){};
      virtual ~MyClass(){};
  
      int assetStatus;
  
      friend class boost::serialization::access;
  
      template&lt;typename Archive&gt; void serialize(
          Archive &amp; ar,
          const unsigned int version)
      {
          ar &amp; BOOST_SERIALIZATION_NVP(assetStatus);
      }
  
      std::string ToString()
      {
          std::string toret;
          toret += " assetStatus: " + assetStatus;
  
          return toret;
      }
  };
  
  int main()
  {
      MyClass a, b;
      a.assetStatus = 10;
  
      std::cout &lt;&lt; a.ToString();
  
      boost::archive::xml_oarchive ooxml(std::ofstream(dbPath));
      ooxml &lt;&lt; BOOST_SERIALIZATION_NVP(a); // error here
  
      MyClass d;
      boost::archive::xml_iarchive iixml(std::ifstream(dbPath));
      iixml &gt;&gt; BOOST_SERIALIZATION_NVP(d); // error here
      std::cout &lt;&lt; d.ToString();
  }
  </code></pre>
  
  <p>I get a compilation error at the lines:</p>
  
  <pre><code>ooxml &lt;&lt; BOOST_SERIALIZATION_NVP(a);
  </code></pre>
  
  <p>and </p>
  
  <pre><code>iixml &gt;&gt; BOOST_SERIALIZATION_NVP(d);
  </code></pre>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>no match for <code>operator&gt;&gt;</code> in <code>'iixml &gt;&gt; boost::serialization::make_nvp(const char*, T&amp;) [with T=MyClass(((MyClass&amp;)(&amp;d)))]'</code></p>
  </blockquote>
  
  <p>Do you have any idea regarding the meaning of this?</p>