Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2006-02-26 14:32:41


"Andy Little" <andy_at_[hidden]> writes:

>>> typedef mpl::plus<mpl::bool_<true>,mpl::bool_<true> >::type type1;
>>> typedef mpl::plus<mpl::int_<1>,mpl::int_<1> >::type type2;
>>> typedef mpl::plus<mpl::long_<1>,mpl::long_<1> >::type type3;
>>> typedef mpl::plus<mpl::integral_c<int,1>,mpl::integral_c<long,1>
>>>>::type type4;
>>>
>>> assert((boost::is_same<type1, mpl::integral_c<bool,true> >::value));
>>> assert((boost::is_same<type2, mpl::integral_c<int,2> >::value));
>>> assert((boost::is_same<type3, mpl::integral_c<long,2> >::value));
>>> assert((boost::is_same<type4, mpl::integral_c<long,2> >::value));
>>
>> What is that supposed to illustrate? Your desires? Current behavior?
>
> Surely its pretty obvious isnt it ?

Surely I wouldn't be asking if it were obvious to me.

>>> You might try reading the context in which that was said ........:-)
>>
>> I did. You might try clearly explaining what you're after.
>
> I'm after a more precise solution, one that leaves .. how shall I
> put this tactfully?... slightly less room for doubt.

So it's just the specification that you want tightened, or do you want
a different behavior? I'm sure the answer seems like it ought to be
obvious to me, but it isn't, so kindly spell it out.

>>> (< hint > look in <boost/mpl/aux_/arithmetic_op.hpp> .......;-)
>>
>> I know what it looks like. I can see how what's specified in the
>> manual is different from (less specific than) what I think you want,
>
> Perhaps you'd like to clarify what you think I want?

It would be a lot simpler if you'd just spell it out. It seems like
you have been asking for several different things at different times.

>> but I don't see how what is actually delivered is any different from
>> what you want. Of course, exactly what you want is still unclear.
>
> I dont understand this especially after your previous remarks. Now
> you seem to be agreeing that what is delivered is unclear?

No, read what I wrote. It's unclear to me what you want. I can't
tell how it differs from the current behavior.

> I thought it couldnt be improved?

Who ever said anything about arithmetic operations couldn't be
improved?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net