After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 595793 - RefPtr should implement operator->*
RefPtr should implement operator->*
Status: RESOLVED DUPLICATE of bug 495762
Product: glibmm
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2009-09-21 02:52 UTC by Christopher Head
Modified: 2010-03-26 09:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christopher Head 2009-09-21 02:52:25 UTC
It would be useful and appropriate if RefPtr implemented operator->*(), just as it implements operator->(). Then you could dereference a pointer to a member of a class against a RefPtr to an object of that class.
Comment 1 Christopher Head 2010-02-08 07:32:24 UTC
OK, apparently operator->* is rather horrific to implement, seeing as it's not just a simple matter of returning the underlying object. Instead, how about providing a nicer way of getting the underlying raw pointer (or even just a reference to the underlying object), so that the built-in ->* or .* can be used? Right now I have to do this:

(ptr.operator->()->*fptr)();

which is pretty ugly. This would be nicer:

(ptr.get()->*fptr)();

but requires the addition of a get() function.
Comment 2 Murray Cumming 2010-03-26 09:55:56 UTC

*** This bug has been marked as a duplicate of bug 495762 ***