title: how to use boost::serialize::make_binary_object against a map
body: <p>my intention is to get input from <code>map&lt;int,std::string&gt;</code> and create the binary archive which the below code is failing to do , is this the right way of creating it?
  And how to know whether the data is correctly archived or not(desirializing using boost)
  Do i just need to create a <code>boost::archive::binary_iarchive oa(oss,1);</code> and copy it to oss ?</p>
  
  <pre><code>#include &lt;fstream&gt;
  #include &lt;boost/serialization/map.hpp&gt;
  #include &lt;boost/serialization/nvp.hpp&gt;
  #include &lt;boost/archive/xml_oarchive.hpp&gt;
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  #include &lt;map&gt;
  #include &lt;boost/archive/binary_oarchive.hpp&gt;
  #include &lt;boost/archive/binary_iarchive.hpp&gt;
  #include &lt;boost/serialization/serialization.hpp&gt;
  
  using namespace std;
  
  class MyConnections
  {
    public:
      MyConnections()
      {
  
         e_group.insert( std::make_pair(1,"ETOTO") ) ;
         e_group.insert( std::make_pair(2,"ETOTO") ) ;
  
     }
  
   template&lt;class archive&gt;
  void serialize(archive&amp; ar, const unsigned int version)
  {
      using boost::serialization::make_binary_object;
      ar &amp;  boost::serialization::make_binary_object(e_group);
  }
  
  
    public:
     typedef   map&lt;int,std::string&gt; groups;
     groups  e_group;
  };
  
  int main(int argc, char* argv[])
  {
      const MyConnections conn;
      stringstream oss(ios_base::out|ios_base::binary);
      boost::archive::binary_oarchive oa(oss,1);
      oa &lt;&lt; boost::serialization::make_binary_object(conn)
      std::cout&lt;&lt;oss.str;
  }
  </code></pre>
  
  <p>Error</p>
  
  <pre><code>main.cpp: In member function 'void MyConnections::serialize(archive&amp;, unsigned int)':
  main.cpp:29:63: error: cannot convert 'MyConnections::groups {aka std::map&lt;int, std::__cxx11::basic_string&lt;char&gt; &gt;}' to 'void*' for argument '1' to 'const boost::serialization::binary_object boost::serialization::make_binary_object(void*, std::size_t)'
           ar &amp;  boost::serialization::make_binary_object(e_group);
                                                                 ^
  main.cpp: In function 'int main(int, char**)':
  main.cpp:42:55: error: cannot convert 'const MyConnections' to 'void*' for argument '1' to 'const boost::serialization::binary_object boost::serialization::make_binary_object(void*, std::size_t)'
      oa &lt;&lt; boost::serialization::make_binary_object(conn)
                                                     ^
  </code></pre>