Boost logo

Boost :

Subject: Re: [boost] [xint] Boost.XInt formal review
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2011-03-05 15:20:48


On Sat, 5 Mar 2011 12:01:57 -0500
Gordon Woodhull <gordon_at_[hidden]> wrote:

> On Mar 3, 2011, at 3:58 PM, Vicente Botet wrote:
>> * The implementation should avoid virtual functions as no needed in
>> this domain. Instead the library should use the CRTP which is well
>> adapted to this kind of abstractions.
>
> There are no virtual functions in integer_t; I think Vicente meant
> virtual inheritance of integer_t_data.
>
> Virtual inheritance adds a little bit of overhead to member access -
> usually offsetting by a value stored in a virtual function table
> (which wouldn't otherwise be needed here). CRTP avoids this nicely.
> [...]

Ah, I wasn't aware of the overhead. Virtual inheritance was the first
thing I saw that took care of the problem, and I didn't consider CRTP
at the time I originally wrote that. Thanks for suggesting it.

-- 
Chad Nelson
Oak Circle Software, Inc.
*
*
*



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