2013/8/19 Mathias Gaunard
On 18/08/13 22:16, paul Fultz wrote:
From: TONGARI J
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.htmlhttp://boost.2283326.n4.nabble.com/New-powerful-way-to-use-enable-if-in-C-0x...
The macro looks sweet and I wonder if we have this macro in Boost in case that I missed it.
This is nice for C++11 and conversion operators
AFAIK this is indeed the only way to constrain template conversion operators with SFINAE. This is the real use of that trick. But why not just use that trick explicitly in that context?
If we have a general way to do it, why would we bother ourselves writing specific code in different contexts? I think the power of abstraction is to let us forget the details, and everything has trade off, put it on the scales, the writability weighs more to me.