Slashdot Mirror


User: Type11

Type11's activity in the archive.

Stories
0
Comments
2
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2

  1. Re:My Favortie Bug (HP STL Problem) (Spelling) on Pet Bugs? · · Score: 2, Funny

    Apparently I can't spell favorite right... Internal bug number #23456.

  2. My Favortie Bug on Pet Bugs? · · Score: 2, Informative

    Was having some really bizzare problems with our String class being used in a stl vector and ended up having to trace it into the RougeWave HP stl. It was in vector<_TypeT,_Allocator>::operator= (const vector<_TypeT,_Allocator>& __x)
    below is the change for anyone who might have hit this or runs this setup. Hope it can help someone avoid it and all the time it wasted. Just love problems in the STL! *** are the two lines changed.

    *** _C_end_of_storage = _C_finish = _C_start + __x.size();
    }
    else { // size() < _x.size() < capacity()
    // advance this->end () first
    *** _C_end_of_storage = _C_finish = _C_start + __x.size ();

    Changed To:

    *** _C_finish = _C_start + __x.size();
    }
    else { // size() < _x.size() < capacity()
    // advance this->end () first

    copy (__x.begin (), __x.begin () + size (), begin ());

    // write past original value of this->end ()
    uninitialized_copy (__x.begin () + size (), __x.end (),
    begin () + size (),
    _RWSTD_VALUE_ALLOC_CAST (*this));
    }

    *** _C_end_of_storage = _C_finish = _C_start + __x.size ();

    This of course was becuase _C_end_of_storage should not have been set before the calling of size() as it would be incorrect.