C++ Logo


Advanced search

[SG14] intrinsic method binding

From: Farid Mehrabi <farid.mehrabi_at_[hidden]>
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.

how am I supposed to end the twisted road of  your hair in such a dark
unless the candle of your face does shed some light upon my way!!!

Received on 2019-04-25 09:21:47