Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-01-15 01:01:15

I sort of understand the problem - are you asking us to do anything

It seems you've got it straightened out for your particular case. Here are
other ideas.

a) You could open the xml_?archive with the no_codecvt flag. This will
the library from changing the code_convert facet. Of course if you do this
probably want to change the code_cvt facet of the text streams you use in
application. But given that its from within your app, you can use your own
overload so this problem can be addressed without changing the your STL
library headers

b) You could compile the whole boost library using your debug new. Then
would be consistent. Good Luck with this.

Robert Ramey

Felipe Magno de Almeida wrote:
> Hello!
> I'm having an assertion failure when working with xml_oarchive.
> The problem is that in xdebug library header, _NEW_CRT is defined as
> another operator new. All standard facets are created using _NEW_CRT.
> But my application overload operators new/delete/new[]/delete[], So
> when _DELETE_CRT is called to delete the facet created in
> basic_text_oprimitive.ipp : 90
> The code is:
> archive_locale.reset(
> add_facet(
> std::locale::classic(),
> new codecvt_null<BOOST_DEDUCED_TYPENAME
> OStream::char_type> )
> It raises an assertion failure, since it wasnt used the same operator
> for creating and deleting the object. This assertion only occurs when
> _DEBUG is defined.
> The workaround I used was to replace new for _NEW_CRT, but it will
> certainly only work for my STL.
> This "different operator new" is only used for facets in the VC7.1
> STL.
> The boost I'm using is the one in cvs (downloaded yesterday).
> Thanks in advance,

Boost list run by bdawes at, gregod at, cpdaniel at, john at