This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Avoid excessive function type casts with splay-trees part 2


On Fri, 8 Jun 2018, Bernd Edlinger wrote:

> Hi!
> 
> 
> This patch converts the splay-tree internals into a template, and makes
> the typed_splay_tree template really type-safe.  Previously everything
> would break apart if KEY_TYPE or VALUE_TYPE would not be pointer types.
> This limitation is now removed.
> 
> I took the freedom to add a remove function which is only for
> completeness and test coverage, but not (yet) used in a productive way.
> 
> 
> Bootstrapped and reg-tested on x86_64-linux-gnu.
> Is it OK for trunk?

It looks OK to me but I wonder if we can avoid some of the code 
duplication due to template instantiation by deriving from a non-templated
base class somehow?  The cc1* binaries keep growing with more and
more template use :/

Thanks,
Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]