Opened 13 years ago

Closed 9 years ago

Last modified 8 years ago

#3328 closed Feature Requests (wontfix)

Serialization support for dynamic_bitset

Reported by: Jeremiah Willcock Owned by: acharles
Milestone: Boost 1.40.0 Component: dynamic_bitset
Version: Boost 1.39.0 Severity: Not Applicable
Keywords: serialization Cc: astukalov@…

Description

A few mailing list posts have requested interoperation of dynamic_bitset with Boost.Serialization. I was able to get serialization to at least compile with the patch attached to this ticket, although that patch should really have the serialize member moved to a similar position to the other member functions.

Attachments (1)

bitset.patch (803 bytes ) - added by Jeremiah Willcock 13 years ago.

Download all attachments as: .zip

Change History (8)

by Jeremiah Willcock, 13 years ago

Attachment: bitset.patch added

comment:1 by astukalov@…, 12 years ago

Cc: astukalov@… added
Keywords: serialization added

comment:2 by anonymous, 11 years ago

I could use this as well. Either this or making those members protected so I can access from a derived class of my own.

comment:3 by Brandon Kohn, 11 years ago

It looks like this ticket could be closed. There is a macro that would allow a user to access the members:

#undef BOOST_DYNAMIC_BITSET_PRIVATE #define BOOST_DYNAMIC_BITSET_PRIVATE protected #include <boost\dynamic_bitset.hpp>

comment:4 by astukalov@…, 11 years ago

@brandon.kohn This looks more like a hack to me as the intention here is just to be compatible with boost::serialization, and not to provide direct access to private members.

Frankly, I would like to hear what the dynamic_bitset maintainer thinks as there are several years-old tickets like this that have no final statement, neither there was any feedback on boost mailing list.

comment:5 by acharles, 9 years ago

Owner: changed from Gennaro Prota to acharles
Status: newassigned

comment:6 by acharles, 9 years ago

Resolution: wontfix
Status: assignedclosed

Unfortunately, no tests are provided with the patch and dynamic_bitset is in maintenance mode, therefore this ticket will be closed until it is reopened with test cases provided.

comment:7 by maxim.yegorushkin@…, 8 years ago

Does it really need a test case because it serializes an integer and a vector which are presumably unit tested by boost::serialization library?

I also have to resort to #define BOOST_DYNAMIC_BITSET_DONT_USE_FRIENDS hack.

Note: See TracTickets for help on using tickets.