Commit Graph

3 Commits

Author SHA1 Message Date
leake d38bd3298c Adding test case for #2872. 2024-04-27 09:19:09 -07:00
William S Fulton 791d0a5e17 Further using declarations fix for inheritance hierarchies
more than two deep and the using declarations are overloaded.
Using declarations from a base class' base were not available for use
in the target language when the using declaration was before a method
declaration.

Closes #2687
2023-10-16 20:05:34 +01:00
William S Fulton 93732bb195 Fix using declarations for deep inheritance hierarchies
Fixes inheritance hierarchies more than two deep and the using
declarations are overloaded. Using declarations
from a base class' base were not available for use in the target
language. For example in the code below, Using1::usingmethod(int i)
was not wrapped for use in Using3:

  struct Using1 {
  protected:
    void usingmethod(int i) {}
  };
  struct Using2 : Using1 {
  protected:
    void usingmethod(int i, int j) {}
    using Using1::usingmethod;
  };
  struct Using3 : Using2 {
    void usingmethod(int i, int j, int k) {}
    using Using2::usingmethod;
  };

Similarly for C++11 using declarations for inheriting constructors.
2023-08-05 19:47:17 +01:00