Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2006-04-01 14:34:20


I'm interested to know in what situations the promotion_traits libarary is meant
to be used? I looked at the standard and I see that it seems to follow that,
but in practise the only similar situation of needing to know promotion rules in
my own code was in choosing the type that the input types are to be converted to
in some operation. The signature would then be simply
promotion_traits<Lhs,Rhs>::type. I see that a one parameter version is necessary
for completeness, but this could be solved by providing a defaul bool parameter.
However the functionality I needed is provided by Boost.Typeof which might also
cover the functionality this library provides anyway ?

I am surprised to see that input parameters unrelated to promotion are allowed
to pass unchanged to the output.The example given is e.g

Expression ---> Result
floating_point_promotion<int const>::type ---> int const

I would expect, rather, to have a compilation failure in case of an invalid

Andy Little

Boost list run by bdawes at, gregod at, cpdaniel at, john at