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,709 of 33,346   
   =?UTF-8?Q?Tobias=20M=C3=BCller?= to DeMarcus   
   Re: Why isn't class a subset of class...   
   05 Dec 12 23:18:35   
   
   -september.org> ced5b43b   
   From: troplin@bluewin.ch   
      
   DeMarcus  wrote:   
   > On 2012-12-05 19:08, Tobias Müller wrote:   
   >> DeMarcus  wrote:'   
   >>> Yes I know, but it takes a template so it should be able to take   
   >>> std::vector, right?   
   >>>   
   >>> template class T>   
   >>> class TakeTemplate   
   >>> {   
   >>> };   
   >>   
   >> template < class T, class Alloc = allocator > class vector;   
   >>   
   >> std::vector template takes two parameters. Implementors are even permitted   
   >> to add more, as long as they have default arguments.   
   >> That means that there is probably no portable way for matching std::   
   >> templates.   
   >>   
   >   
   > I didn't know implementers were permitted to add more (defaulted)   
   > arguments.   
      
   It seems that I was wrong, it is not allowed to add more template   
   arguments. It turns out to be only a rumor, I dindn't verify it myself.   
   Thanks for the correction, Daniel Krügler.   
      
   > Actually that makes it even more desirable to allow   
   > TakeTemplate to receive variadic templates or normal templates with any   
   > number of arguments (as long as there are default arguments so it   
   > matches TakeTemplate).   
      
   But then, shouldn't the same also be possible with default function   
   arguments?   
      
   Tobi   
      
      
   --   
         [ 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