Boost logo

Boost :

Subject: Re: [boost] [serialization] VC++ compiler warnings
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2011-07-11 21:27:19


On Mon, Jul 11, 2011 at 5:55 PM, Stephan T. Lavavej
<stl_at_[hidden]> wrote:
> [Emil Dotchevski]
>> I'd appreciate warnings that catch bad pointers, but getting a warning
>> just because I'm using a pointer is silly. What is the programmer
>> expected to do? Be more careful?
>
> I think the idea was that everyone would use make_checked_array_iterator() (or, for vector/array destinations, write to them directly instead of through pointers).
>
> During VC8, the idea was also that checking in release mode was totally cool and wouldn't be a big deal.

I was kind of on board with that. Checking pretty much only causes
performance problems when using std::vector, and even then, typically
there is no problem as long as you don't use op[] for sequential
access.

When performance sucks, rather than turning off checking for all of
STL, you can convert individual problematic cases to using pointers --
otherwise it is premature optimization.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


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