#include <iostream> class Bar {}; namespace blah { class Foo { public: using Bar = ::Bar; }; void test(Foo::Bar) { std::cout << "blah" << std::endl; } } int main(void) { test(blah::Foo::Bar{}); }
Standard input is empty
prog.cpp:15:2: error: use of undeclared identifier 'test'; did you mean 'blah::test'? test(blah::Foo::Bar{}); ^~~~ blah::test prog.cpp:9:6: note: 'blah::test' declared here void test(Foo::Bar) { ^ 1 error generated.
Standard output is empty