stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Created: (STDCXX-210) std::vector<bool>::insert() broken
Date Wed, 28 Jun 2006 17:42:29 GMT
std::vector<bool>::insert() broken
----------------------------------

         Key: STDCXX-210
         URL: http://issues.apache.org/jira/browse/STDCXX-210
     Project: C++ Standard Library
        Type: Bug

  Components: 23. Containers  
    Versions: 4.1.2, 4.1.3    
 Environment: all
    Reporter: Martin Sebor


Moved from the Rogue Wave bug tracking database:

#include <cassert>
#include <vector>

int main ()
{
    const bool a[] = { false, false, true, true };

    std::vector<bool> v (a, a + 3);

    const std::vector<bool>::iterator it = v.end () - 1;

    v.insert (it, true);

    const std::vector<bool> res (a, a + 4);

    assert (v == res);
}

Compiling it with EDG eccp 3.4 on SunOS 5.7 against libstd 4.0 and running yields:

$ ./t
t.cpp:16: Assertion 'v == res' failed.
Abort (core dumped)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message