http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59560

--- Comment #3 from janus at gcc dot gnu.org ---
(In reply to klaas_giesbertz from comment #0)
> This code compiles both with gcc4.7.3 and gcc4.8.2 and gives in both cases
> the incorrect output:
> Base Func called
> It should have called the DerivedFunc instead.

The second example is a bit tricky.

Note that the resolution of your generic 'Func' happens at compile time and
only based on the declared type -- the dynamic type of the objects does not
matter at all.

I would say the behavior here is ok as well.

Reply via email to