for the following code:
class A {
friend void fun(){};
};
int main() {
fun();
}
I know that it is illegal since fun
cannot be find with normal lookup rules. My question is: why C++ choose this design and doesn't let fun
to be find?
Thanks!