I have a big library i am making, and I have a Event<class t, class o> class, and a Controller class
In the Controller.h I have this
class Controller
{ //<this is line 22 in my file
...
public:
Event<float,Con troller> XChanged; //Line 38
Event<float,Con troller> YChanged;
Event<float,Con troller> ThrottleChanged ;
Event<bool,Cont roller> TriggerChanged;//line 41
...
and I get the following errors
/../../Threads/DelegateEvent.h : In instantiation of `Event<float, Controller>':
/../tjoystick.h:38: instantiated from here
/../../Threads/DelegateEvent.h :118: error: `Event<T, O>::objectToMon itor' has incomplete type
/../tjoystick.h:22: error: forward declaration of `class Controller'
/../../Threads/DelegateEvent.h : In instantiation of `Event<bool, Controller>':
/../tjoystick.h:41: instantiated from here
/../../Threads/DelegateEvent.h :118: error: `Event<T, O>::objectToMon itor' has incomplete type
/../tjoystick.h:22: error: forward declaration of `class Controller'
controller.h contains this
template <typename T, class O> class Event
{
T (O::*fiiftrue)( );
O objectToMonitor ; //<line 118
Thread listenThread;
In the Controller.h I have this
class Controller
{ //<this is line 22 in my file
...
public:
Event<float,Con troller> XChanged; //Line 38
Event<float,Con troller> YChanged;
Event<float,Con troller> ThrottleChanged ;
Event<bool,Cont roller> TriggerChanged;//line 41
...
and I get the following errors
/../../Threads/DelegateEvent.h : In instantiation of `Event<float, Controller>':
/../tjoystick.h:38: instantiated from here
/../../Threads/DelegateEvent.h :118: error: `Event<T, O>::objectToMon itor' has incomplete type
/../tjoystick.h:22: error: forward declaration of `class Controller'
/../../Threads/DelegateEvent.h : In instantiation of `Event<bool, Controller>':
/../tjoystick.h:41: instantiated from here
/../../Threads/DelegateEvent.h :118: error: `Event<T, O>::objectToMon itor' has incomplete type
/../tjoystick.h:22: error: forward declaration of `class Controller'
controller.h contains this
template <typename T, class O> class Event
{
T (O::*fiiftrue)( );
O objectToMonitor ; //<line 118
Thread listenThread;
Comment