I'm not really sure if it's a bug in clang or not.
I think https://stackoverflow.com/questions/41595208/accessing-the-name-of-a-private-inherited-class-from-a-subclass says not
the |
I'm not really sure if it's a bug in clang or not.
I think https://stackoverflow.com/questions/41595208/accessing-the-name-of-a-private-inherited-class-from-a-subclass says not
No Linters Available |
No Unit Test Coverage |
Buildable 17633 | |
Build 17651: arc lint + arc unit |
sorry, but I have to reject this change, it is definitly a bug in clang-9. Why shall a parameter that uses QList<unsigned int> be a "private" element? This makes no sense. It seems that clang does not take into account that QList is a template and has template parameters - the place where it is used is a class that has a parent which has a parent that also is a QList<...>, but a QList of a different type.
However, this made me reconsider using a QList<unsigned int> for a list of numbers, which might not be a good choice. I changed that to QVector<unsigned int> which IMHO fits better.
-> obsoleted by git commit ae4027d640d3
Commit ae4027d640d3297e78d8d0c87389aade128476a5 fixes the problem in a different way, by changing QList<T> parameters to QVector<T>.
The original problem is, as @aacid says, the way C++ works (and not a clang 9 bug; more that earlier clang and gcc shouldn't accept it in the first place):
The example given elsewhere (and on StackOverflow, as @aacid also pointed out):
// For QList: this is obviously public struct foo {}; // For MultiTrackSource, **privately** inheriting the public QList struct bar : private foo {}; // For MultiTrackWriter, publicly inheriting MultiTrackSource, but here // .. QList is now hidden as a **name** by the private inheritance in MultiTrackSource. struct baz : public bar { // Declaration of func() using QList parameters causes a compile error // .. because QList is private **in this context** as a name. That's why // .. re-anchoring the name lookup (as @aacid and I did in patches) works, // .. because the public name is found rather than the private name. void func( foo& ); };