Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

False positive: warning #1125: function ${A} is hidden by function ${B}

$
0
0
struct A {
 private:
  virtual void foo() {}  // Side-info: template-method pattern in the real code.
};

struct B : public A {
 private:
  void foo(int) {}
};

The warning is stating that A::foo is hidden by B::foo.

A::foo() is private and cannot be called from B, anyway.

The warning does not happen if A::foo is not virtual.

The compiler version is icpc (ICC) 17.0.1 20161005.

Thread Topic: 

Bug Report

Viewing all articles
Browse latest Browse all 1175

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>