Boost C++ Libraries: Ticket #11961: Serialization of stl container with non-copyable value https://svn.boost.org/trac10/ticket/11961 <p> A stl container which stores a non-copyable value can not be serialized and gives a compile error about copy constructor. I used g++-4.18 with c++11 flag on. I attached my code to this bug, it is a minimal code which reproduces the error. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11961 Trac 1.4.3 mohsen.tamiz@… Sun, 07 Feb 2016 13:00:31 GMT attachment set https://svn.boost.org/trac10/ticket/11961 https://svn.boost.org/trac10/ticket/11961 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">foo.cc</span> </li> </ul> <p> minimal code which reproduces the error </p> Ticket anonymous Mon, 08 Feb 2016 09:54:46 GMT <link>https://svn.boost.org/trac10/ticket/11961#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11961#comment:1</guid> <description> <p> Using g++-5.x can compile the program when container is std::vector bu another containers like <code>std::unordered_map</code> causes the same compile error even with g++-5.x. I have created a <a class="ext-link" href="http://stackoverflow.com/questions/35252645/compilation-error-in-using-boost-serialization-for-stl-containers-with-non-copya/35259462#35259462"><span class="icon">​</span>question</a> in stackverflow about this bug. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Mon, 08 Feb 2016 11:29:32 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11961#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11961#comment:2</guid> <description> <p> By changing line 43 of archive_input_unordered_map.hpp from: </p> <pre class="wiki">s.insert(t.reference()); </pre><p> to : </p> <pre class="wiki"> s.emplace(piecewise_construct, forward_as_tuple(std::move(t.reference().first)), forward_as_tuple(std::move(t.reference().second))); </pre><p> The error disappear, and it works. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Sat, 16 Apr 2016 19:18:53 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11961#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11961#comment:3</guid> <description> <p> fixed in 1.61 also fixed for archive_input_unordered_set </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Sat, 16 Apr 2016 19:19:01 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/11961#comment:4 https://svn.boost.org/trac10/ticket/11961#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket