Scope variables.
Agustin
agustin.l.alvarez at hotmail.com
Mon Oct 7 12:58:20 PDT 2013
I'm having a hard time trying to use "scoped".
public T callEvent(T, A...)(auto ref A args) const
{
T pEvent = scoped!T(forward!args);
postEvent(pEvent, typeid(T).toHash);
return pEvent;
}
private void postEvent(ref Event event, Event.ID type) const
{
....
}
src\event\EventManager.d(37): Error: function
ghrum.event.EventManager.EventManager.postEvent (ref Event event,
uint type) const is not callable using argument types
(MyEvent,uint)
src\event\EventManager.d(37): Error: function
ghrum.event.EventManager.EventManager.postEvent (ref Event event,
uint type) const is not callable using argument types
(MyEvent,uint) const
src\event\EventManager.d(37): Error: cast(Event)pEvent is not an
lvalue
More information about the Digitalmars-d-learn
mailing list