#pragma once namespace ns { namespace a { namespace b { template struct Inner { void f(); }; } } template struct Derived : a::b::Inner { void g() { this->f(); } }; } // Second Inner class at global scope forces multi-candidate path // in populateCppDependentBases, exercising the namespace filter. template struct Inner { void g2(); };