On 06/24/2015 02:23 AM, Richard Sandiford wrote:
Jeff Law <l...@redhat.com> writes:
So I'm holding off on approving this one pending further discussion of
the use of multiple inheritance for nofree_ptr_hash.

I thought that might be controversial. :-)  My two main defences are:

1) This is multiple inheritance of traits classes, which all just have
    static member functions, rather than multiple inheritance of data-
    carrying classes.  It's really just a union of two separate groups
    of functions.
As I was thinking about this during review I almost convinced myself that multiple inheritance from traits classes ought to be acceptable.

As you state, they don't carry data and we're just getting a union of their functions. One could probably even argue that traits classes by their nature are designed to be composed with other traits and classes.

I'm (obviously) not as well versed in this stuff as I ought to be, hence my conservatism. It'd be real helpful if folks with more real world experience in this space could chime in on the pros/cons if this approach.

If we do go forward, ISTM updating our coding conventions to codify this exception to the "avoid MI" would be wise. And my inclination is to go forward, but let's give other folks a chance to chime in.


Jeff

Reply via email to