You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A derived class lists the inheriting constructors of its base as its own #1358
using Base::Base; makes the constructors of Base constructors of the class that writes it, and constructors aren't inherited any further. Yet a class that derives from that class lists the using-declaration as one of its own members:
structBase { Base(int); };
structMid : Base { using Base::Base; };
structDerived : Mid {};
The page of Derived has a "Using Declarations" table with Base in it, linking to the declaration in Mid, although Derived can't be constructed from an int.
Why it happens
When it copies the members of a base into a derived class, src/mrdocs/Metadata/Finalizers/BaseMembersFinalizer.cpp skips constructors and destructors, but not a using-declaration that inherits constructors. It should skip that too. #1317 adds isInheritingConstructor to src/mrdocs/Corpus.cpp to recognize such a declaration, and it could be moved where both places can use it.
The copying predates #1317, which only makes the entry read Base instead of the name of the derived class.
Activity