home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 32,941 of 33,346   
   Leigh Johnston to All   
   Sequence container capacity after callin   
   23 Mar 13 16:27:46   
   
   XPost: comp.lang.c++, comp.std.c++   
   From: leigh@i42.co.uk   
      
   Hi,   
      
   Can we please change the ISO C++ Standard so that explicitly states what   
   happens to a sequence container's capacity() after calling clear()?   
      
   Currently the behaviour is unspecified and I know of at least one   
   implementation that deallocates on vector::clear().   
      
   If the behaviour remains unspecified then it is effectively impossible   
   to write portable code that uses clear() and you have to hope things   
   such as v.erase(v.begin(), v.end()) behave more consistently across   
   different implementations.   
      
   /Leigh   
      
      
   --   
   [ comp.std.c++ is moderated.  To submit articles, try posting with your ]   
   [ newsreader.  If that fails, use mailto:std-cpp-submit@vandevoorde.com ]   
   [              --- Please see the FAQ before posting. ---               ]   
   [ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca