Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Bug Report: icc 17

Xavier_V_
Beginner
363 Views

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
362 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

0 Kudos
Xavier_V_
Beginner
362 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.

 

0 Kudos
Judith_W_Intel
Employee
362 Views

 

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

Judy

0 Kudos
Reply