|
Boost : |
From: Mat Marcus (mmarcus-boost_at_[hidden])
Date: 2003-09-12 03:24:18
--On Thursday, September 11, 2003 11:31 PM +0100 Hamish Mackenzie
<hamish_at_[hidden]> 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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk