Boost logo

Boost :

Subject: Re: [boost] [xint] Third release is ready, requesting preliminary review
From: DE (satan66613_at_[hidden])
Date: 2010-05-03 13:19:05


on 03.05.2010 at 20:34
 Chad Nelson wrote :
> On 05/03/2010 10:54 AM, Jeffrey Lee Hellrung, Jr. wrote:
>> I would suggest moving the memory management up (or down, depending
>> on how you view things) to the derived classes. How feasible is that?
>> You can use CRTP to get access to the derived class's members.

> It's not really feasible to push it to the derived classes, since it
> would involve a lot of duplicate code. The memory management is almost
> completely identical between all of the integer types, so it makes more
> sense to have it in a base class.

> However, as I mentioned yesterday, I've found a need to separate the
> memory management functions from the base class anyway. I plan to move
> them into an intermediary class, something that inherits from
> base_integer, and that all the derived classes inherit from.

how about making derived classes to call base class' protected methods
to initialize the storage?

-- 
Pavel
P.S.
if you notice a grammar mistake or weird phrasing in my message
please point it out

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