Re: [10/23] Tweak the way that is_a is implemented

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/13/20 1:16 AM, Richard Sandiford via Gcc-patches wrote: > At the moment, class hierarchies that use is_a are expected > to define specialisations like: > > template <> > template <> > inline bool > is_a_helper ::test (symtab_node *p) > { > return p->type == SYMTAB_FUNCTION; >

[10/23] Tweak the way that is_a is implemented

2020-11-13 Thread Richard Sandiford via Gcc-patches
At the moment, class hierarchies that use is_a are expected to define specialisations like: template <> template <> inline bool is_a_helper ::test (symtab_node *p) { return p->type == SYMTAB_FUNCTION; } But this doesn't scale well to larger hierarchies, because it only defines ::t