|
Boost : |
Subject: Re: [boost] [mpl] integral_c [type_traits] integral_constant limits
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-11-16 16:15:22
----- Original Message -----
From: "John Maddock" <boost.regex_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, November 15, 2010 10:17 AM
Subject: Re: [boost] [mpl] integral_c [type_traits] integral_constant limits
>
>>This means that with the current implementation we can not use
>>integral_constant with the max value of the type.
>>
>>Do you think this is a bug in integral_constant?
>
> It's nasty, but we do need MPL support in type_traits, so I don't see what
> we can really do about this?
>
> Can mpl be fixed not to cause numeric overflow when the value is at the
> limit of the range?
I gues that it will be enough to overload the next and prior metafunctions on integral_c so the next and prior nestedtypes are no more nedeed, but I don't understand why the compiler is instantiating these types when not used yet. Could someone clarify if this instantiation is conforming to the standard?
Vicente
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk