I know a typedef cannot be forward declared in C++, but I wonder what may be the best solution for the following problem. I have a header file which declares MyClass
like this:
#include <TemplateClassHeaders>
struct MyStruct
{
// ...
}
typedef Really::Long::TemplateClassName<MyStruct> MyClass;
MyClass
is used in many places, but mostly just as a pointer being passed through Qt signal-slot mechanism. A forward declaration would be all that's needed, but since MyClass
is a typedef that will not work. Is there a way to avoid adding myclass.h to every header which uses a pointer to MyClass
?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With