Re: empty set erase(end()) call
From: Leor Zolman (leor_at_bdsoft.com)
Date: Sat, 27 Mar 2004 00:24:59 GMT
On 26 Mar 2004 14:28:39 -0800, email@example.com (Cesar Mello) wrote:
>The following code has different behavior in vc++6, vc++6 with stlport
>and vc++7.1. What is the standard behavior?
My guess is that passing an end() iterator as the argument to erase invokes
undefined behavior, but I haven't found any evidence of that yet in the
Standard. That doesn't mean it isn't there, but in any case it would make
sense that there's no rational interpretation of erasing at a position
defined as "one past the end".
-- Leor Zolman --- BD Software --- www.bdsoft.com On-Site Training in C/C++, Java, Perl and Unix C++ users: Download BD Software's free STL Error Message Decryptor at: www.bdsoft.com/tools/stlfilt.html