1 #define CLASS(NAME) \ 2 class NAME { \ 3 public: \ 4 struct Inner; \ 5 Inner *i = nullptr; \ 6 }; \ 7 NAME::Inner &getInner##NAME(); 8 9 CLASS(A) CLASS(B)10CLASS(B) 11 CLASS(C) 12 CLASS(D) 13 CLASS(E) 14 CLASS(F) 15 CLASS(G) 16 17 int main() 18 { 19 A::Inner &inner_a = getInnerA(); 20 B::Inner &inner_b = getInnerB(); 21 C::Inner &inner_c = getInnerC(); 22 D::Inner &inner_d = getInnerD(); 23 E::Inner &inner_e = getInnerE(); 24 F::Inner &inner_f = getInnerF(); 25 G::Inner &inner_g = getInnerG(); 26 27 return 0; // break here 28 } 29