"Peter Dimov" wrote
Andy Little wrote:
An alternative suggestion is to explicitly specify what seems to be the actual behaviour of arithmetic operations on int_'s, long's etc in the documentation. The actual behaviour seems to be that these functions invariably return an integral_c. It could then also be specified that the value_type of the result is found by applying the usual promotion rules to the types of each of the (non mpl::na) arguments. That would at least tighten up any play in the current specification.
Isn't this what the docs already seem to say?
Nearly but not specifically Return type: Integral Constant (Concept.) Maybe it could be changed to (something like) Return type: integral_c< typeof(c1::value + c2::value) , ( c1::value + c2::value ) > c; This would guarantee that is_same can be used on the result. Currently I cant assume that. regards Andy Little