1 | #define CLASS(NAME) \ |
---|---|
2 | class NAME { \ |
3 | public: \ |
4 | class Inner { \ |
5 | int j = #NAME[0]; \ |
6 | }; \ |
7 | Inner *i = nullptr; \ |
8 | }; \ |
9 | \ |
10 | static NAME::Inner inner; \ |
11 | static NAME obj; \ |
12 | NAME::Inner &getInner##NAME() { return inner; } |
13 |
1 | #define CLASS(NAME) \ |
---|---|
2 | class NAME { \ |
3 | public: \ |
4 | class Inner { \ |
5 | int j = #NAME[0]; \ |
6 | }; \ |
7 | Inner *i = nullptr; \ |
8 | }; \ |
9 | \ |
10 | static NAME::Inner inner; \ |
11 | static NAME obj; \ |
12 | NAME::Inner &getInner##NAME() { return inner; } |
13 |