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,953 of 33,346   
   Leigh Johnston to alan_mckenney1@this.is.invalid   
   Re: Sequence container capacity after ca   
   28 Mar 13 17:14:19   
   
   From: leigh@i42.co.uk   
      
   On 28/03/2013 22:16, alan_mckenney1@this.is.invalid wrote:   
   > On Wednesday, March 27, 2013 5:00:05 PM UTC-4, Andy Champ wrote:   
   >> On 27/03/2013 15:01, alan_mckenney1 wrote:   
   >>   
   >>> [*] I really wish C++ would incorporate C99 variable-length arrays.   
   >>   
   >>> They would have_really_  simplified some sections of my code.   
   >>   
   >> std::array won't help? Or doesn't your compiler support it?   
   >   
   > It doesn't seem to (no man page.)   
   >   
   > But anyway, based on what documentation I've found on the web, the size of   
   > a std::array is determined at compile time.  I need it to be determined   
   > at run time, but be allocated on the stack.   
      
   Not sure if it quite fits your needs but you could try my "vecarray"   
   container: you specify a maximum size as a template parameter (compile   
   time) but actual number of elements can vary.   
      
   http://i42.co.uk/stuff/vecarray.htm   
      
   /Leigh   
      
      
   --   
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- 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