
On Sat, 5 Mar 2011 12:01:57 -0500 Gordon Woodhull <gordon@woodhull.com> 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. * * *