Before C++20, MSVC treated any friend function declaration as a function declaration, so the following code would compile despite funGlob being declared after its first call:
class Glob {
public:
friend void funGlob();
void test() {
funGlob();
}
};
void funGlob() {}This proposed patch mimics the MSVC behavior when in MSVC compatibility mode