Re: Overly aggressive checking in new STL (Visual Studio 2005)?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Before this release, I could do:
f (&*v.begin (), &*v.end ())

Which is illegitimate. You can't dereference v.end() and take the address.
Same is true of all the other STL containers. You are better off passing the
size as 2nd argument and doing any address calculation inisde f.

I really I can turn off ALL debug checking, but I really do like the idea
of
having some - perhaps most of the checking that you've implemented. I just
don't want perfectly legitimate reasonable code to be treated as broken!

Not legitimate. The code _IS_ broken (and always has been).
Previous compilers let you get aways with it. This one does not.

Cheers

Stephen Howe


.