Boost logo

Boost Users :

Subject: Re: [Boost-users] [Serialization] STL Containers and Non-Default Constructors
From: Robert Ramey (ramey_at_[hidden])
Date: 2015-05-23 14:57:34


On 5/23/15 10:54 AM, Bjorn Reese wrote:
> I think boost/serialization/list.hpp checks for the default constructor
> in the wrong way. If you use std::vector instead of std::list, then it
> compiles.

I've recently spent some time on this and I believe that I've now fixed
it. I had some difficulty with "is_default_constructible".

a) seems that type traits aren't correct on latest version of clang -
though I'm not sure about this.

b) if a type has is default constructor but it's marked private - (some
people do this!) it shows up as not having a default constructor.

c) if there is not default constructor it shows up as not having a
default constructor.

The above seems obvious in retrospect - but it's takes a while to sort
out when the problem is "doesn't handle private constructor" etc.
Hopefully I've got it sorted out.

It should be faster in some cases as well. And there maybe an
opportunity to make it faster in more cases - but I haven't time to
spend more of on it.

Robert Ramey


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net