Boost logo

Boost :

Subject: Re: [boost] Is there BOOST_ENABLE_IF macro now?
From: TONGARI J (tongari95_at_[hidden])
Date: 2013-08-18 12:48:21


2013/8/18 Mathias Gaunard <mathias.gaunard_at_[hidden]>

> On 18/08/13 08:30, TONGARI J wrote:
>
>> Hi folks,
>>
>> It's over 2 years since this post:
>> http://boost.2283326.n4.**nabble.com/New-powerful-way-**
>> to-use-enable-if-in-C-0x-**td3442723.html<http://boost.2283326.n4.nabble.com/New-powerful-way-to-use-enable-if-in-C-0x-td3442723.html>
>>
>> The macro looks sweet and I wonder if we have this macro in Boost in case
>> that I missed it.
>>
>
> What's the practical reason of having a macro?
>
> The approaches suggested in the thread all have limitations. For example
> they require you to put some unique non-ambiguous type in all your
> overloads of a said function.
>
> The classical approach recommended for enable_if is still the best way to
> use SFINAE for a boolean meta-function or a boolean constant expression.
>
> For this one, you're better off just knowing what you're doing than to
> rely on macro magic.
>

I should refer to this:

http://lists.boost.org/Archives/boost/2011/08/184468.php

Of course it's for C++11 only...


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk