class Something
{
int a,b;
public:
Something(int a, int b): this->a(a), this->b(b)
{}
void doSomething() {} // is translated into "void doSomething(Something* const this) {}"
// The T in "T* const this" is replaced with the class type
friend void doSomething2() {} // is not translated, as it is NOT a member function
};
void doSomething2() {}
{
int a,b;
public:
Something(int a, int b): this->a(a), this->b(b)
{}
void doSomething() {} // is translated into "void doSomething(Something* const this) {}"
// The T in "T* const this" is replaced with the class type
friend void doSomething2() {} // is not translated, as it is NOT a member function
};
void doSomething2() {}
by SomeGuyThatDoesn'tIncludeSex September 16, 2019