You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2006/06/28 19:42:29 UTC

[jira] Created: (STDCXX-210) std::vector::insert() broken

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


[jira] Updated: (STDCXX-210) std::vector::insert() broken

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor updated STDCXX-210:
--------------------------------

    Fix Version/s: 4.2
         Assignee: Martin Sebor

> std::vector<bool>::insert() broken
> ----------------------------------
>
>                 Key: STDCXX-210
>                 URL: https://issues.apache.org/jira/browse/STDCXX-210
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 23. Containers
>    Affects Versions: 4.1.3, 4.1.2
>         Environment: all
>            Reporter: Martin Sebor
>            Assignee: Martin Sebor
>             Fix For: 4.2
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (STDCXX-210) std::vector::insert() broken

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor closed STDCXX-210.
-------------------------------

    Resolution: Cannot Reproduce

Cannot reproduce with the latest trunk.

> std::vector<bool>::insert() broken
> ----------------------------------
>
>                 Key: STDCXX-210
>                 URL: https://issues.apache.org/jira/browse/STDCXX-210
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 23. Containers
>    Affects Versions: 4.1.3, 4.1.2
>         Environment: all
>            Reporter: Martin Sebor
>            Assignee: Martin Sebor
>             Fix For: 4.2
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.