Opened 12 years ago
Closed 12 years ago
#4652 closed Bugs (invalid)
is_wrapper<std::string> assertion failed in xml_archive case
Reported by: | Owned by: | Robert Ramey | |
---|---|---|---|
Milestone: | To Be Determined | Component: | serialization |
Version: | Boost 1.44.0 | Severity: | Problem |
Keywords: | Cc: |
Description
When I serialize a class that includes std::string non intrusively, below error occurred.
'boost::mpl::assertion_failed' : Cannot convert 1st argument 'boost::mpl::failed boost::serialization::is_wrapper<T>::* *' to 'boost::mpl::assert<false>::type'.
T=const std::string
The error occurs only when I use the xml_archive. The text_archive has no problem.
I tried to fix my code. And I add below code.
BOOST_CLASS_IS_WRAPPER(std::string)
The error doesn't occur.
But I don't understand why should I use this macro. I guess it should care in the serialization library.
I attached the simple example to reproduce this problem.
Attachments (1)
Change History (3)
by , 12 years ago
Attachment: | str_wrap_err.cpp added |
---|
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Sorry, I made a very easy mistake.
I forgot BOOST_SERIALIZATION_NVP at str_wrap_err.cpp(27).
After fixing my code, The error doesn't occur.
Before
After
Please change the ticket status to invalid.