Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-03-29 12:43:33


----- Original Message -----
From: "Jeremy Siek" <jsiek_at_[hidden]>

> On Thu, 29 Mar 2001, Ullrich Koethe wrote:
> koethe> I don't see why the result traits shouldn't be part of the
algebraic
> koethe> concept definitions. After all, you always need them together.
>
> Oh, I didn't mean that I wouldn't add them to the requirements. I just
> meant that I'd apply the current language about convertibility, etc. to
> the type produced by the traits.

I think the point here is that you want the result of

    x * y

to be exactly the type

    result_traits<op_mul, X, Y>

And not just something suitably convertible. Remember, conversions are not
transparent to the language: you only get one user-defined conversion per
function argument.

-Dave


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