Boost C++ Libraries: Ticket #7158: Add serialization support for std::array https://svn.boost.org/trac10/ticket/7158 <p> Add support for std::array to boost/serialization/array.hpp where it is available. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7158 Trac 1.4.3 Georg Fritzsche <georg.fritzsche@…> Sat, 21 Jul 2012 05:07:43 GMT attachment set https://svn.boost.org/trac10/ticket/7158 https://svn.boost.org/trac10/ticket/7158 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">serialize-std-array.patch</span> </li> </ul> <p> Add support for std::array to serialization/array.hpp </p> Ticket Robert Ramey Thu, 09 Aug 2012 17:45:08 GMT <link>https://svn.boost.org/trac10/ticket/7158#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7158#comment:1</guid> <description> <p> Interesting - this is new to me. </p> <p> At first I couldn't see the following are different. After looking at the standard I do see a difference. </p> <pre class="wiki">int x[10]; array&lt;in, 10&gt; x; </pre><p> I like your implementation - makes sense. But I'm concerned about the possibility of undetected subtlties - like sizeof(x) returning bytes whild x.size() returns elements. Inside the serialzation of an array we use sizeof(x)/sizeof(int) to figure the number of elements. Since &lt;array&gt; supports arrays of zero elements - but I suspect that the sizeof(std::array&lt;int, 0&gt;) is not zero, it's not clear that your implementation isn't bulletproof. </p> <p> At the very minimum this would need a test to detect implementation quirks in &lt;array&gt;. </p> <p> Take another look at this. </p> <p> Robert Ramey </p> <p> PS. I see now that &lt;array&gt; isn't a replacement for x[] but rather for boost::array. I don't know if we're even testing boost/array.hpp for serialization. RR </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Thu, 06 Feb 2014 21:56:47 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7158#comment:2 https://svn.boost.org/trac10/ticket/7158#comment:2 <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> <p> I've implemented serialization for &lt;array&gt; and checked it into the development branch. It's included in the header boost/serializaiton/array.hpp </p> <p> Robert Ramey </p> Ticket