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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to tmmikolajczyk from comment #0)
> The compilation passes (on gcc and clang). It's quite weird that the
> virtualism of the "X::bar" method has such an impact.

But that doesn't make it a bug.

> Please also consider the following sligthly modified "X::bar" method:
> 
> virtual void bar(const T& inst) const
> 
> Gcc silently accepts such code. but clang rejects it:

That is probably just because GCC has some bugs regarding access checking in
function templates, see PR 59002

Reply via email to