$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [xint] Third release is ready, requesting preliminary review
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-05-03 13:28:01
----- Original Message -----
From: "DE" <satan66613_at_[hidden]>
To: "Chad Nelson" <boost_at_[hidden]>
Sent: Monday, May 03, 2010 7:19 PM
Subject: Re: [boost] [xint] Third release is ready,requesting preliminary review
>
> 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.
You need to mut the minimal part on the derived part, but don't add to much on the 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.
Ths should not solve the problem as both integer and fixed will inherit from this intermediary class.
> how about making derived classes to call base class' protected methods
> to initialize the storage?
This is no necesary. with CRTP the base class can call the Final class. Friend can be added when necessary.
Vicente