|
Boost Users : |
Subject: Re: [Boost-users] [Serialization] Non-default constructor and template class
From: Philipp Münzel (mailing-lists_at_[hidden])
Date: 2015-06-22 16:45:31
Not so much LOL. I was referring to this bug:
https://svn.boost.org/trac/boost/ticket/11343
which seems to be fixed now on master.
On 16.06.2015 18:01, Robert Ramey wrote:
> On 6/16/15 1:19 PM, Philipp Münzel wrote:
>>
>>>
>>> you should be able to simply define a private default constructor, if
>>> boost::serialization::acess is declared as a friend of your class.
>>
>> In theory. Current bugs in boost::serialization however then prevent the
>> use in a container, for example serializing a std::set<T> where T has a
>> private default constructor.
>
> lol - that's not a bug - that's the way it's always been. And it has
> nothing to do with serialization of containers per se. The whole
> concept of "private function" conflicts with the concept of calling
> functions from outside the class. So either one violates the contract
> implied by private and implements the constructor outside the class or
> one respects the C++ syntax and doesn't try to get around it.
>
> Robert Ramey
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
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