libstdc++/8230: Buggy allocator behaviour

bkoz@gcc.gnu.org bkoz@gcc.gnu.org
Wed Nov 13 14:19:00 GMT 2002


Synopsis: Buggy allocator behaviour

Responsible-Changed-From-To: unassigned->bkoz
Responsible-Changed-By: bkoz
Responsible-Changed-When: Wed Nov 13 14:19:11 2002
Responsible-Changed-Why:
    Mine.
State-Changed-From-To: open->feedback
State-Changed-By: bkoz
State-Changed-When: Wed Nov 13 14:19:11 2002
State-Changed-Why:
    I don't think this is an allocator::allocate issue per se. The member function reserve is only in std::vector and std::vector<bool>, and the standard says
    
    23.2.4.2 - vector capacity
    
    -4- Throws: length_error if n > max_size().* 
    
    Where allocator::allocate doesn't know what vector::max_size is. 
    
    This fix brings the code up to conformance, and is the best fix I think.
    
    -benjamin

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8230



More information about the Gcc-bugs mailing list