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 31,542 of 33,346   
   =?ISO-8859-1?Q?Daniel_Kr=FCgler?= to Mathias Gaunard   
   Re: std::vector for incomplete type   
   05 Oct 11 03:25:27   
   
   a91c4325   
   From: daniel.kruegler@googlemail.com   
      
   On 2011-10-05 00:41, Mathias Gaunard wrote:   
   > On Oct 4, 8:44 pm, "Martin B."<0xCDCDC...@gmx.at>  wrote:   
   >   
   >> Hmmm ... haven't some issues wrt. to forward declaring stuff   
   >> (templates?) been addresses in C++11?   
   >   
   > The default template parameters would be a problem to forward declare   
   > std::vector.   
      
   This wouldn't be the actual problem, I think. You could omit the default   
   template argument without a problem, which is typically sufficient for   
   most use-cases.   
      
   > I've never really understood why redefining default template   
   > parameters after a forward-declaration is ill-formed.   
      
   This is due to fact, because that follows the same rules like default   
   arguments of functions:   
      
   void foo(int = 42);   
   void foo(int = 42); // Ill-formed   
      
   HTH & Greetings from Bremen,   
      
   Daniel Krügler   
      
      
   --   
         [ 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