My problem is that in my "Widget" class i've the following declaration:
MouseEvent* X;
In a member function I initialize the pointer with an address the normal way:
X = new MouseEvent;
Ok, this last line makes the compiler stop at:
error C2166: l-value specifies const object
All right, a MouseEvent is declared as a typedef to simplify things:
typedef Event__2<void, Widget&, const MouseEventArgs&> MouseEvent;
And Event__2 is, as you may imagine as: (basic structure shown):
template <typename return_type, typename arg1_T, typename arg2_T>
class Event__2
{
...
};
I don't know where the Event__2 class gets the const qualifier. Any tips ?
Thanks.