Opened 15 years ago

Closed 14 years ago

#1708 closed Bugs (fixed)

Can't serialize class with private destructor

Reported by: Paul Roberts <paul@…> Owned by: Robert Ramey
Milestone: Boost 1.36.0 Component: serialization
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

When serializing a class A with a private destructor, boost::serialization::extended_type_info_typeid::destroy() is trying and failing to access the destructor. Friending boost::serialization::access in A is not sufficient.

Attached code sample includes compiler output from MSVC 9.

Attachments (1)

serialization_repro2.cpp (10.9 KB ) - added by Paul Roberts <paul@…> 15 years ago.
Repro code sample

Download all attachments as: .zip

Change History (4)

by Paul Roberts <paul@…>, 15 years ago

Attachment: serialization_repro2.cpp added

Repro code sample

comment:1 by Robert Ramey, 14 years ago

Status: newassigned

comment:2 by Douglas Gregor, 14 years ago

This is a regression from Boost 1.35.0, which allowed the serialization of a class with a private or protected destructor, so long as that class made boost::serialization::access a friend.

comment:3 by Robert Ramey, 14 years ago

Resolution: fixed
Status: assignedclosed

I've addressed this in the trunk.

Note: See TracTickets for help on using tickets.