Opened 13 years ago

Closed 13 years ago

#3261 closed Bugs (fixed)

Can't export derived class with a data member of type std::string

Reported by: mat087@… Owned by: Matthias Troyer
Milestone: Boost 1.40.0 Component: mpi
Version: Boost 1.39.0 Severity: Problem
Keywords: Cc:

Description

The attached file shows that calling BOOST_CLASS_EXPORT on a derived class that contains a data member of type std::string will fail at compilation.

Adding

namespace boost
{
   namespace mpi
   {
      template<> struct is_mpi_datatype<std::string>  : public mpl::true_ {};
   }
}

will make it compile and run.

Attachments (1)

main.cpp (1.3 KB ) - added by mat087@… 13 years ago.

Download all attachments as: .zip

Change History (5)

by mat087@…, 13 years ago

Attachment: main.cpp added

comment:1 by Matthias Troyer, 13 years ago

Owner: changed from Douglas Gregor to Matthias Troyer
Status: newassigned

comment:2 by Matthias Troyer, 13 years ago

The bug is confirmed and is caused by Boost.Serialization treating std::string and std::wstring as fundamental types to be handled directly by the archive. I'm thinking about how best to solve this for the skeleton&content mechanism, which is the issue here.

comment:3 by Matthias Troyer, 13 years ago

Bug is fixed and the patch will be committed to trunk and release once all regression tests are confirmed to work again

comment:4 by Matthias Troyer, 13 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.