Date: Thu, 25 Apr 2019 18:49:35 +0430
Is there any interest enabling deferred call semantics for intrinsic method
binding with native syntax:
*std::function<signature> fn=instance.method;*
IMHO due to spec of member function pointers, std::bind is expensive in
terms of memory. It also has the downside of too verbose syntax which is
too complicated for training novice programmers and lacks the ability to
cover early bound base methods:
*auto fn=instance.base::method;*
And lambdas cannot help if code repetition is intended because one would
need to forward all arguments:
*auto lam=[&instance](Args...)*
*{return instance.method(params...);};*
Thanks in advance.
regards,
FM
binding with native syntax:
*std::function<signature> fn=instance.method;*
IMHO due to spec of member function pointers, std::bind is expensive in
terms of memory. It also has the downside of too verbose syntax which is
too complicated for training novice programmers and lacks the ability to
cover early bound base methods:
*auto fn=instance.base::method;*
And lambdas cannot help if code repetition is intended because one would
need to forward all arguments:
*auto lam=[&instance](Args...)*
*{return instance.method(params...);};*
Thanks in advance.
regards,
FM
-- how am I supposed to end the twisted road of your hair in such a dark night?? unless the candle of your face does shed some light upon my way!!!
Received on 2019-04-25 09:21:47