21 Dec
2006
21 Dec
'06
3:28 p.m.
Dear all, I just typed something like this: void Foo(void (I::*pmf)()) { boost::shared_ptr<I> ptr(new I); (ptr->*pmf)(); } but this does not compile. Is there are rationale behind this? I have no experience in ovelroading operator->*, so maybe this question arises from ignorance. Wkr, me
22 Dec
22 Dec
5:53 p.m.
New subject: [shared_ptr] operator->*
gast128 wrote:
Dear all,
I just typed something like this:
void Foo(void (I::*pmf)()) { boost::shared_ptr<I> ptr(new I); (ptr->*pmf)(); }
but this does not compile. Is there are rationale behind this? I have no experience in ovelroading operator->*, so maybe this question arises from ignorance.
It appears that operator->* is not overloaded for shared_ptr. You can achieve the same thing by doing: ((*ptr).*pmf)(); David
6551
Age (days ago)
6552
Last active (days ago)
2 comments
2 participants
participants (2)
-
David Walthall
-
gast128