Boost logo

Boost :

Subject: Re: [boost] [xint] Boost.XInt formal review
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2011-03-08 04:36:56


On 07.03.2011 20:27, SATAN66613 wrote:
> on 07.03.2011 at 13:48
> Christopher Jefferson wrote :
>> So users of a expression-template based xint would need to know about proto::deep_copy?
>> Also, I would expect these problems to become more serious in C++0x
>> code, because users will probably write expressions like:
>> auto i = x + y;
>> Which would be fine for built-in types, and introduce bugs if x or
>> y was an xint::integer, using proto.
> could we prevent this misusage by making copy constructor of the
> expression class private (possibly never implementing it)?
Since we're talking C++0x, making it =delete would be the right thing.
And yes, that should prevent the misuse. Come to think of it, I can't
think of any reason why that wouldn't work.

Sebastian


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