blob: 56eb80a5056da2a29a947e3d840f3bcc458d8138 [file] [log] [blame]
// Build don't link:
// excess errors test
// This testcase won't fail if class ::foo is forward-declared in the
// global namespace, nor if class bar is not a template class.
template <typename T = void>
class bar {
public:
friend class foo; // this is not bar::foo, it forward-declares ::foo
class foo {};
bar() { foo(); } // but this should refer to bar::foo
};
bar<> baz;