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,698 of 33,346    |
|    DeMarcus to All    |
|    Why isn't class a subset of class... ?    |
|    28 Nov 12 02:19:37    |
   
   From: use_my_alias_here_at_hotmail_com@tellus.orb.dotsrc.org   
      
   Hi,   
      
   I want to provide a template taking one or more classes (...) to a   
   template that takes a template that takes one class only. See below.   
      
   #incude    
      
   template   
   class EllipsisTemplate;   
      
   template   
   class EllipsisTemplate   
   {   
   };   
      
   template   
   class EllipsisTemplate   
   {   
   };   
      
      
   template class T>   
   class TakeTemplate   
   {   
   };   
      
      
   int main()   
   {   
    std::cout <<   
    typeid( TakeTemplate ).name() <<   
    std::endl;   
      
    return 0;   
   }   
      
   But when I compile this with GCC 4.7.2 I get the following error.   
      
   error: type/value mismatch at argument 1 in template parameter list for   
   ‘template class T> class TakeTemplate’   
      
   error: expected a template of type ‘template class T’, got   
   ‘template class EllipsisTemplate’   
      
      
   Why can't I substitute template with template ?   
      
      
   Thanks,   
   Daniel   
      
      
   --   
    [ 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