Boost logo

Boost :

From: Thomas Witt (witt_at_[hidden])
Date: 2003-07-09 14:25:05


On Wednesday 09 July 2003 21:09, Jaakko Jarvi wrote:
> 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);

Ok I can see the problem, but what about

template <class T, class U>
typename enable_if< mpl::and<is_matrix<T>, is_vector<U> >,...>::type
operator*(const T& t, const U& u);

?

Thomas

-- 
Dipl.-Ing. Thomas Witt
Institut fuer Verkehrswesen, Eisenbahnbau und -betrieb, Universitaet Hannover
voice: +49(0) 511 762 - 4273, fax: +49(0) 511 762-3001
http://www.ive.uni-hannover.de

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