I'm faced with two compilation errors: C3646 and C4430. Let me show you:
I'm referring to this header file:
Timer.h
class Timer {
}
This piece of source code is working fine (in a header file):
#include "Timer.h"
class Something{
Timer timer_;
This piece of source code is not working (in another header file):
class Something_else : public Singleton<Something_else> {
friend Singleton<Something_else>;
Timer getDebuggerTimer;
The compilation errors I get are the mentioned ones:
C3646 'getDebuggerTime': unknown override specifier
C4430 missing specifier - int assumed.
I have tried to include the mentioned header file Timer.h
but this is making things even worse (I believe this file is already included via the other include entries).
Why is the compiler expecting override specifiers? (As far as I know there's no need for them, I'm just adding a property to a class?)
On the other places where it's used, the value is filled in in the constructor of the corresponding class (also in the header file). Does this have any impact on this issue?
For your information: the Singleton
is used for implementing the corresponding design pattern.
An extra remark: the issue (at first sight) seems not to be related to namespaces.