I got the following error:
error C3646: 'closure' : unknown override specifier
The code:
void BaseOperator::mousebutton_cb(EventObject* sender, EventArgs* calldata, void* closure)
{
xd3D::Operation::Operator::BaseOperator* operator = (xd3D::Operation::Operator::BaseOperator*)closure;
MouseButtonEventArgs* e = (MouseButtonEventArgs*)calldata;
if (e->Status == Down)
operator->OnMouseButtonDown(e);
else
operator->OnMouseButtonUp(e);
}
Do you know why I have this error?
operator
is a keyword. The sequence operator =
tries to declare an assignment operator which in your case would have a pointer parameter type. And your compiler wants to parse the very last closure
as a special specifier like override
(afaik an extension of MSVC), const
or such.
Rename the variable to something else, like myoperator
.