callme
callme copied to clipboard
Clarification: Is possible to have a Delegated unset ?
I used other delegate libraries (eg: https://www.etlcpp.com/delegate.html) and is possible to have a Delegated unset, so I had to check is_valid before call the delegate.
Is this possible with this library? or this library forces that a Delegate is always valid and possible to call?
Hello,
A default-constructed delegate is empty and it may be invoked, which has no effects. A non-default constructed delegate is bound to its target from the very beginning and cannot be reassigned any other target. An empty (default-constructed) delegate variable may be assigned a non-empty delegate. There are no such functions as is_valid() or empty(). Hope this helps