|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-07-09 15:49:01
David Abrahams wrote:
> Jaakko Jarvi <jajarvi_at_[hidden]> writes:
>
>> Where we've used enable_if, it has been very common that the
>> condition is not just a single traits lookup, but rather a logical
>> expression, e.g.:
>>
>> template <class T, class U>
>> typename enable_if<is_matrix<T>::value &&
>> is_vector<U>::value,...>::type operator*(const T& t, const U& u);
>>
>> So definitely, this version of enable_if is needed.
>
> really?
>
> template <class T, class U>
> typename enable_if<mpl::and<is_matrix<T>, is_vector<U>
> >,...>::type operator*(const T& t, const U& u);
>
> looks better to me.
Sorry, no. If you deny me a non-broken enable_if, I'll just write one
myself. I am not going to uglify my expressions for no good reason.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk