On Fri, Oct 12, 2012 at 4:22 AM, Richard Biener <richard.guent...@gmail.com> wrote:
> I also think that instead of > >>> if (cgraph_node *q = p->cast_to <cgraph_node *> ()) > > we want > > if ((q = cast_to <cgraph_node *> (p)) > > I see absolutely no good reason to make cast_to a member, given > that the language has static_cast, const_cast and stuff. cast_to > would simply be our equivalent to dynamic_cast within our OO model. > > Then I'd call it *_cast instead of cast_*, so, why not gcc_cast < >? > Or dyn_cast <> (). That way > > if ((q = dyn_cast <function *> (p)) This looks fine to me. Diego.