Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-07-09 17:16:32


"Peter Dimov" <pdimov_at_[hidden]> writes:

> The compilers that can do SFINAE well enough for enable_if should be able to
> handle && in integral constant expressions, no?

I'm not sure; some of the compilers which have trouble with ICEs are
older EDGs, which as you know tend to have surprisingly good
capabilities in some areas.

>> * enable_if<_1, _2> is a valid lambda expression
>
> Doesn't matter, unless I'm missing something. I'm not saying that an
> mpl friendly enable_if should not be included. I'm saying that
> forcing mpl on people is not necessarily a good idea.

Note that I suggested supply enable_if_c for your usage.

Neither version forces MPL on people:

     template <bool X> struct B { static const bool value = X; };

can be used to adapt:

    enable_if< B<whatever>, ... >

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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