Boost logo

Boost :

From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2006-01-15 09:46:31


On 1/15/06, Robert Ramey <ramey_at_[hidden]> wrote:
> I sort of understand the problem - are you asking us to do anything
> specific?

I think it could be added a workaround. When detected VC7.1 and its
STL, it could use _NEW_CRT operator instead of the general new.

>
> It seems you've got it straightened out for your particular case. Here are
> some
> other ideas.
>
> a) You could open the xml_?archive with the no_codecvt flag. This will
> prevent
> the library from changing the code_convert facet. Of course if you do this
> you'll
> probably want to change the code_cvt facet of the text streams you use in
> your
> application. But given that its from within your app, you can use your own
> new
> overload so this problem can be addressed without changing the your STL
> library headers

The problem is that the locale doesnt use the overloaded operator
delete, but a function called: std::_DebugHeapDelete, so the facet
should be created using _NEW_CRT. And it will probably be hard to
detect if more facets are being used without a proper workaround in
boost, leaving not detected bugs. Although I'm already looking forward
to a compiler upgrade. But I'm still concerned about other VC7.1 users
of serialization library.

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

That's what I've done for now, but I think more people overloading
operators new/delete and using serialization library will have a hard
time finding this STL bugs again. IMHO, a workaround in the
serialization library (or a more general create_facet, which would
embed the workaround in detail namespace, for use in more libraries in
boost) would be better for serialization users.

> Robert Ramey

[snip]

Thanks for you attention.

--
Felipe Magno de Almeida

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk