Re: Overly aggressive checking in new STL (Visual Studio 2005)?
- From: "Stephen Howe" <stephenPOINThoweATtns-globalPOINTcom>
- Date: Mon, 13 Mar 2006 18:56:48 -0000
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 ideaof
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
.
- Follow-Ups:
- Re: Overly aggressive checking in new STL (Visual Studio 2005)?
- From: Records For Living Support
- Re: Overly aggressive checking in new STL (Visual Studio 2005)?
- Prev by Date: Re: Overly aggressive checking in new STL (Visual Studio 2005)?
- Next by Date: Re: Problem with reading an int with operator>>
- Previous by thread: Re: Overly aggressive checking in new STL (Visual Studio 2005)?
- Next by thread: Re: Overly aggressive checking in new STL (Visual Studio 2005)?
- Index(es):