ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
Re: [boost] Re: Re: [optional] update
by Mat Marcus other posts by this author
Sep 12 2003 1:52AM messages near this date
Re: [boost] Re: Re: [optional] update | Re: [boost] Re: Re: [optional] update
SOURCE --On Thursday, September 11, 2003 11:31 PM +0100 Hamish Mackenzie 
<hamish@[...].uk>  wrote:
>  Is there something similar for using with template classes?
>  Something like
> 
>  template< typename T >
>  class my_class : enable_if< is_same< T, x >::value >
>  {
>  };

I think the usual idiom is:

template <typename T, typename Enable = void> 
class my_class; //general case

template <typename T> 
class A<T, typename enable_if<is_same<T, x> ::value>::type> //special 
case
{
};

 - Mat
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Fernando Cacciola
Fernando Cacciola
Fernando Cacciola
Mat Marcus

Guillaume Melquiond

Mat Marcus
Eric Friedman
Hamish Mackenzie
Fernando Cacciola
Eric Friedman
Markus Werle
Hamish Mackenzie
Mat Marcus
Mat Marcus
Hamish Mackenzie
Fernando Cacciola
Hamish Mackenzie
Fernando Cacciola
David Abrahams
Eric Friedman
Fernando Cacciola
Hamish Mackenzie
Russell Hind
Hamish Mackenzie
Joel de Guzman

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved