Commit Graph

2 Commits

Author SHA1 Message Date
William S Fulton b78dba177a Inherit constructors named through a typedef base
C++11 inheriting constructors (using Base::Base;) now work when the immediate
base class is named through a typedef, a chain of typedefs, a typedef whose
template argument is itself a typedef, a scope-qualified or namespaced name, or
a type-template parameter used directly as the base class (the mixin idiom).

The inheriting constructor's using-declaration qualifier is normalized in the
typepass stage; the inheriting base is then found by identity in the resolved base
class list and the base class' constructors are used to implement the inherited
constructors.

An inheriting-constructor using declaration whose qualifier is not an immediate
base class is reported with Warning 329 (uses base '...' which is not an
immediate base of '...') rather than the generic Warning 315.

Closes #2951)

Assisted-by: Claude Opus 4.8
2026-06-17 01:47:06 +01:00
William S Fulton b27ad0a923 Add warning for incorrect using declarations for inheriting constructors 2023-07-14 08:39:27 +01:00