Bug Report: icc 17

Bug Report: icc 17

Hi,

https://godbolt.org/g/lrH8Dy
struct A {
  template <class T> auto func(T t) -> decltype(T::other);
};

struct B: A {
  template <class T> auto func(T t) -> decltype(T::other);
  using A::func;
};

struct P { int other; };

void call(B b, P p) {
  b.func(p);
}
icc considers the call ambiguous when it should hide the base class declarations.
See also [namespace.udecl](15): 

"When a using-declaration brings declarations
from a base class into a derived class, member functions and member function
templates in the derived class override and/or hide member functions and member
function templates with the same name, parameter-type-list (8.3.5), cv-qualification,
and ref-qualifier (if any) in a base class (rather than conflicting). Such hidden or 
overridden declarations are excluded from the set of declarations introduced by the
using-declaration."

Cheers,

Xavi

Thread Topic: 

Bug Report
4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

 

Thanks for the bug report and the nice small test case. I can reproduce this with our current development compiler and have entered this as DPD200418459 in our internal bug tracking database.

Judy

Hi, Judy.

Do we have more information on this?

Just noticed Intel Compiler 17.0 Update 4 has been released and the compiler bug isn't fixed.

 

 

No update, it's still open on our end.

Judy

Leave a Comment

Please sign in to add a comment. Not a member? Join today