Boost logo

Boost :

Subject: Re: [boost] [xint] Performance of fixed-size large integers
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-03-04 13:49:41


On 04/03/2011 19:36, Mathias Gaunard wrote:
> On 04/03/2011 19:01, Christopher Jefferson wrote:
>
>> There are still cases where COW can beat move semantics. For example,
>> I have need of the same integer in multiple places.
>
> Then you should have all those places refer to the same integer, not
> make all those places hold a copy of it.

You could use boost::flyweight to achieve this. In any case it's
somewhat you build on top of an object for a specific application, not a
property of the object itself.


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