I know there are a couple of circular dependency issues out there, but I just couldn't solve this one.
I have two classes: Manager and Managed. Manager creates Managed objects and Managed basically wraps a couple of Manager methods and some of them are templated.
// Manager.h
struct Manager {
Managed create(); // To be defined in the .cpp
template <typename T>
Managed create() {
Managed managed(this); // Access Managed constructor
managed.whatever<T>(); // Access templated function
managed.whateverElse();
return managed;
}
}
struct Managed {
explicit Managed(Manager* manager) : manager(manager) {}
template <typename T>
void whatever() {
manager->... // use the Manager pointer for whatever purpose
}
void whateverElse(); // To be defined in the .cpp
Manager* manager;
}
It is a static library project, for any sake.
Also, real code can be found here.
Is there any way to solve this?