[RFC] Two versions of struct _Rb_tree_impl... or not?!
Nathan Myers
ncm-nospam@cantrip.org
Tue Jul 6 04:35:00 GMT 2004
On Mon, Jul 05, 2004 at 11:05:09PM +0200, Paolo Carlini wrote:
> Hi,
>
> I'm reading the following, rather new, code, and would appreciate some help
> understanding what is supposed to achieve, in principle, at least
>
> // Specialization for _Comparison types that are not capable of
> // being base classes / super classes.
> [...]
>
> I gather that something went wrong with the original idea and now we end
> up having a specialization that is a duplicate of the primary template :(
It appears that somebody was trying to avoid storing a _Comparison
object as a member if (as is common) it is a class with no data members.
If it's a pointer to function, you have no choice. Otherwise, you can
use "empty-base" tricks to share storage with some other sub-object
of a different type.
(Note to somebody: in C++ there is no such thing as a "superclass".)
Nathan Myers
ncm-nospam@cantrip.org
More information about the Libstdc++
mailing list