#include <cstdio> namespace NNamespace{ struct S{ friend void f(S) { puts("hello"); } }; } int main() { NNamespace::S s; NNamespace::f(s); }
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:15: error: ‘f’ is not a member of ‘NNamespace’
Standard output is empty