On Wed, Aug 8, 2012 at 3:08 PM, Eric J. Holtman <e...@holtmans.com> wrote:
> On 8/8/2012 4:51 PM, Chris Morris wrote:
>> I want to keep STL debugging *for the rest of my project*. This leads me to
>> consider compiling the protocol buffers project without STL debugging info.
>>
>> What are the implications of this?
>
> Unless you are *very* careful, this is going to lead to
> problems:

Let me second this. Microsoft themselves is very clear that if the
destructor doesn't do its cleanup on an STL container that was built
with debug features, bad things will happen.

I think the best you could do is build all your protocol buffer stuff
(including the base library) with _HAS_ITERATOR_DEBUGGING=0. Your
container types likely won't match, so you'll have to use std::copy
and such to move data between other parts of your code and protocol
buffers, but otherwise it might work.

This would likely introduce as many bugs as it might fix, and the
debug stuff for STL containers has some other nasty side effects as
well (scoping rules for for loops change). I'd recommend instead just
doing without... maybe use a 3rd party checked iterator library in the
places you really want it.

-- 
Chris

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to