Jaakko Jarvi <[EMAIL PROTECTED]> 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.

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

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to