Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-08-21 06:17:10

David Abrahams wrote:
> Jaakko Jarvi <jajarvi_at_[hidden]> writes:
>> 4. Non-SFINAE compilers
>> Dave has an implementation of enable_if which defaults to being
>> always enabled for compilers that do not support SFINAE. We do not
>> think this is the right approach, and believe that attemts to use
>> enable_if on a compiler that does not support SFINAE, should cause
>> an immediate error.
> Can you justify that choice a bit? In the applications where I've
> used it, no-op behavior provides good gradual degradation in
> functionality (I don't have a strong opinion though).

template<class X, class Y>
  typename enable_if<is_expression<X>::value || is_expression<Y>::value,
  operator+(X const & x, Y const & y);

Boost list run by bdawes at, gregod at, cpdaniel at, john at