C++ Logo

SG14

Advanced search

Subject: intrinsic method binding
From: Farid Mehrabi (farid.mehrabi_at_[hidden])
Date: 2019-04-25 09:19:35


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

-- 
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!!!


SG14 list run by sg14-owner@lists.isocpp.org

Older Archives on Google Groups