Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-01-31 14:19:32


"Fernando Cacciola" <fernando_cacciola_at_[hidden]> writes:

>> > So, first of all, do you agree that the mpl form is better?
>>
>> It's "better", but maybe not for the reasons you think ;-). [It has
>> to do with metafunction/metadata polymorphism]
>>
> Also... It is a burden to deal with X::value in bcc5.5.1 because
> you need to fully qualify X, but not for X::type, do given that many
> metafunctions accept mpl's forms already, it is better if only for
> this reason.

Granted.

Note though: why do you think it is that many (MPL) metafunctions
accept mpl's forms already? metafunction/metadata polymorphism again
;-)

>> I think the fix is much easier than either of those:
>>
>> typedef integral_c<T, static_cast<T>(value + 1)> next;
>> typedef integral_c<T, static_cast<T>(value - 1)> prior;
>>
> Of course! I've tried many _other_ casts (for 'value' and '1' individually),
> but not this one...
>
> It works now!

Great, I'll apply the patch to CVS.

-- 
                       David Abrahams
   dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

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