Re: [Boost-bugs] [Boost C++ Libraries] #7158: Add serialization support for std::array

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7158: Add serialization support for std::array
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-08-09 17:45:08

#7158: Add serialization support for std::array
  Reporter: Georg Fritzsche <georg.fritzsche@…> | Owner: ramey
      Type: Patches | Status: new
 Milestone: Boost 1.51.0 | Component: serialization
   Version: Boost 1.51.0 | Severity: Problem
Resolution: | Keywords:

Comment (by ramey):

 Interesting - this is new to me.

 At first I couldn't see the following are different. After looking at the
 standard I do see a difference.
 int x[10];
 array<in, 10> x;
 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 <array>
 supports arrays of zero elements - but I suspect that the
 sizeof(std::array<int, 0>) is not zero, it's not clear that your
 implementation isn't bulletproof.

 At the very minimum this would need a test to detect implementation quirks
 in <array>.

 Take another look at this.

 Robert Ramey

 PS. I see now that <array> isn't a replacement for x[] but rather for
 boost::array. I don't know if we're even testing boost/array.hpp for

Ticket URL: <>
Boost C++ Libraries <>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC