I want to create a C++ class with the following type:
- It can be declared inside of a function.
- It can be declared inside of a member function.
- It can not be declared as a class member.
The use of this: think "Root" objects for a GC.
Is this possible in C++? In particular, I'm using g++. Willing to switch to clang. Either templates or macro solution fine.
Thanks!