Boost logo

Boost :

Subject: Re: [boost] New, powerful way to use enable_if in C++0x
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2011-04-13 10:55:08


On Wed, Apr 13, 2011 at 4:14 AM, Daniel Frey <d.frey_at_[hidden]> wrote:

> That's really nice, but I think the syntax might be improved. How about
> adding a ::value to enable_if (and the other templates) to allow your
> example to look like this:
>

Please reread the thread. I already explained why that doesn't work (see my
responses to Gevorg). You need to use a non-type template argument that
get's SFINAE'd otherwise you create multiple overloads that differ only in
default arguments.

-- 
-Matt Calabrese

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