You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, you construct a delegate with a freestanding function like this: my_delegate_type::create<my_function>(), and use it like this: add_callback(my_delegate_type::create<my_function>()).
It would be nice to have an implicit constructor for this case, then this ::create distraction could be omitted and simplified to just add_callback(my_function).
As I understand, this syntax is possible for functors and lambdas, but not for freestanding functions. There are probably obstructions to doing this, otherwise you'd probably have implemented it long ago, but my c++-fu is not strong enough to understand it.
The text was updated successfully, but these errors were encountered:
At the moment, you construct a delegate with a freestanding function like this:
my_delegate_type::create<my_function>()
, and use it like this:add_callback(my_delegate_type::create<my_function>())
.It would be nice to have an implicit constructor for this case, then this
::create
distraction could be omitted and simplified to justadd_callback(my_function)
.As I understand, this syntax is possible for functors and lambdas, but not for freestanding functions. There are probably obstructions to doing this, otherwise you'd probably have implemented it long ago, but my c++-fu is not strong enough to understand it.
The text was updated successfully, but these errors were encountered: