Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2000-12-04 12:12:35


Does what operator is being applied ever make a difference in the type
promotion? If this is the case then the traits would need a third
parameter, perhaps a tag for the operator. In the following example it
would be something like "add_tag".

types_promotion_traits<add_tag, T1, T2>::type

On Mon, 4 Dec 2000, Aleksey Gurtovoy wrote:
> template<class T1, class T2>
> my< boost::types_promotion_traits<T1, T2>::type >
> operator+( my<T1> const& m1, my<T2> const& m2 ) {
> return m1.value + m2.value;
> }

----------------------------------------------------------------------
 Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
 Ph.D. Candidate email: jsiek_at_[hidden]
 Univ. of Notre Dame work phone: (219) 631-3906
----------------------------------------------------------------------


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