-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)   
|