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,997 of 33,346   
   Johannes Schaub to All   
   Should partial specializations be ablel    
   10 Mar 12 11:20:56   
   
   From: schaub.johannes@googlemail.com   
      
   Currently this is forbidden:   
      
     template   
     class hash;   
      
     template::value, int>::type = 0   
     > struct hash {   
       // if argument is an enum, then this specialization is used   
     };   
      
   Allowing default arguments in partial specializations could be used for   
   SFINAE cases like this. The spec currently says that default arguments   
   are forbidden for partial specializations because they could not be used   
   anyway (because for completing an argument list, the default arguments   
   declared in the template-parameter-list of the primary template is   
   used). But for SFINAE cases like above, default arguments could be   
   useful IMO.   
      
   What do you think about this?   
      
      
   --   
         [ 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