Fix hidden member templates in derived classes
According to Clang's interpretation of the C++ standard, "member
functions in the derived class override and/or hide member functions
with the same name and parameter types in a base class". This seems
to also hold for templated member functions and even if the code has
a using-declaration of the base class member.
This affects LilyPond's implementation of the method_finder template.
Luckily, the problem can be solved by just re-declaring the base
template specializations in each derived class instead of 'using' them.
The only drawback is that this doesn't work out-of-the-box for deeper
inheritance hierarchies. However, this only affects three ligature
engravers so I think it's worth the maintenance to just encode the
transitive inheritance manually.
For context, please see the following threads:
- https://lists.gnu.org/archive/html/lilypond-devel/2018-11/msg00019.html
- http://lists.llvm.org/pipermail/cfe-users/2018-November/001417.html
- https://bugs.llvm.org/show_bug.cgi?id=39581
Last edit: Jonas Hahnfeld 2019-11-14
Diff:
Passes make. make check and a full make doc.
Patch on countdown for Nov 18th
Move comment that I overlooked
http://codereview.appspot.com/559250043
Patch counted down - please push.
Pushed as