struct a_t {
struct not_yet_known_t;
struct b_t {
void f(not_yet_known_t* m);
};
struct c_t {
b_t b;
//...
};
struct not_yet_known_t {
c_t c;
//...
};
// ERROR HERE
void b_t::f(not_yet_known_t* m) {
// code comes here
}
};
int main() {
a_t::not_yet_known_t m;
a_t::b_t b;
b.f(&m);
}
Is it possible to define a_t::b_t::f inside a_t:: scope some way? Or if we could access global scope inside a_t:: but not actually pasting the code outside a_t:: scope?
Error I get:
main.cpp:16:13: error: non-friend class member 'f' cannot have a qualified name
void b_t::f(not_yet_known_t* m) {
~~~~~^