I am new to C+ and I wonder why this code compiles fine with g+ and MSVC:
namespace t {
class A {
public:
int i;
};
int b(int k, A a) {
return k;
}
}
int main()
{
t::A cl;
return b(5, cl);
}
I thought that b should not be visible from the main function.