Boost logo

Boost :

Subject: Re: [boost] [xint] Third release is ready, requesting preliminary review
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-05-01 13:01:11


----- Original Message -----
From: "DE" <satan66613_at_[hidden]>
To: "Chad Nelson" <boost_at_[hidden]>
Sent: Saturday, May 01, 2010 6:43 PM
Subject: Re: [boost] [xint] Third release is ready,requesting preliminary review

>
> on 01.05.2010 at 2:10
> Chad Nelson wrote :
>>> however so far i have a suggestion about fixed_integer
>>> for me it is counter intuitive that a fixed_integer<N> allocates
>>> memory on the heap rather than on the stack [...]
>
>> That was a tough decision. I started out with it on the heap, but
>> there's no way to use the more-efficient swap(), operator=, or copy/move
>> constructors that way. The best choice came down to which set of
>> operations happens more commonly: swapping and assignment or creating a
>> new object. I have no way of objectively measuring that for other
>> people's code, but for my own, swapping and assignment edge out object
>> creation, slightly.
>
> that argument is enough for me and anyway it's _your_ decision
> i only make a suggestion

What about implementing both strategies, either as separated classes, or adding a template parameter?

Best,
Vicente


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