GNOME Bugzilla – Bug 595793
RefPtr should implement operator->*
Last modified: 2010-03-26 09:55:56 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.
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.
*** This bug has been marked as a duplicate of bug 495762 ***