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,701 of 33,346   
   DeMarcus to All   
   Re: Why isn't class a subset of class...   
   02 Dec 12 05:14:29   
   
   From: use_my_alias_here_at_hotmail_com@tellus.orb.dotsrc.org   
      
   >> Why can't I substitute template with template ?   
   >   
   > I guess for the same reason that TakeTemplate won't work:   
   > it's not specified to work that way.   
   >   
      
   What's the rationale behind it?   
      
   To my understanding, templates are a way to match   
   whatever-works-in-the-end since we have features like Lazy Instantiation   
   and SFINAE.   
      
   Therefore, template is not a type with its own signature but a   
   pattern that could be matched. Since that pattern is a subset of   
   template it should be able to be substituted, and then later   
   SFINAE does the matchmaking.   
      
   I understand that templates are not an easy thing to specify, so these   
   were just my thoughts about how I perceive template programming when   
   trying to learn it.   
      
      
   Regards,   
   Daniel   
      
      
   Footnote: I think that template is also a subset of templates   
   with default arguments like template>, therefore TakeTemplate should work in my   
   opinion.   
      
      
      
   --   
         [ 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