Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Xavier_V_
Beginner
46 Views

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

0 Kudos
3 Replies
Judith_W_Intel
Employee
46 Views

 

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

Xavier_V_
Beginner
46 Views

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.

 

Judith_W_Intel
Employee
46 Views

 

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

Judy

Reply