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

Nathaniel Shead <nathanieloshead at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nathanieloshead at gmail dot 
com

--- Comment #1 from Nathaniel Shead <nathanieloshead at gmail dot com> ---
I believe this is correct behaviour: The definition of `operator++` in the
child class hides the `operator++` declared in the base class. Similarly to the
following code:


struct base {
  void f(int) {}
};
struct d1 : base {
  void f() {}
};
struct d2 : base {
  using base::f;  // explicitly add base::f as an overload
  void f() {}
};

int main() {
  d1{}.f(10);  // error
  d2{}.f(10);  // OK
}

Reply via email to