Covariant overrides on the Buffer Hierachy

Richard Warburton richard.warburton at
Sun Apr 20 18:56:52 UTC 2014


It looks to me like there are no obvious problems with changing the buffer
> subclasses to use covariant overrides. As Alan mentioned, one API was
> modified this way in 7, by Martin Buchholz. The discussion threads for this
> change are [2] and [3]. It looks like Martin considered additional
> covariant overrides, but ultimately backed off from this for a variety of
> incidental reasons; see [4]. There is a certain amount of work here above
> and beyond just changing the return types, but there don't appear to be any
> fundamental issues.

So I've put a patch on cr at It also touches
a couple of other classes which have unnecessary casts in. Aside from being
a good idea, fixing the casts is also necessary due to -Werror.  Let me
know if I've missed anything or if there are any outstanding issues.

I think the bugs that this resolves are:


  Richard Warburton
  @RichardWarburto <>

More information about the core-libs-dev mailing list