https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66472

Christoph Hertzberg <chtz at informatik dot uni-bremen.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chtz at informatik dot 
uni-bremen.
                   |                            |de

--- Comment #1 from Christoph Hertzberg <chtz at informatik dot uni-bremen.de> 
---
Wouldn't this actually be a valid warning if BaseClass had a constructor taking
a function pointer/member function pointer?

struct BaseClass {
  BaseClass(int) { std::cout << "int\n"; }
  BaseClass(int () ) { std::cout << "int()\n"; }
  BaseClass(int (BaseClass::*)()) {std::cout << "int (BaseClass::*)()\n"; }
  static int size() { return 0;}
  int size2() { return 0; }
};

struct Foo : public BaseClass {
  using BaseClass::size;
  using BaseClass::size2;

  // size shadows BaseClass::size!
  Foo(int size) : BaseClass(size) {}
  Foo() : BaseClass(size) {}      // uses BaseClass::size
  Foo(char) : BaseClass(size2) {} // uses BaseClass::size2
};

Reply via email to