On Sun, Mar 22, 2009 at 8:52 PM, Ç®ÏþÃ÷ <
kyleqian@gmail.com> wrote:
> I am sorry that I did not figure out the whole intention. Beside calling
> member function, I hope to delete the object immediately.
> I wrote the code at first time:
>
> std::for_each( items.rbegin(), items.rend(),
> (_1->*&DiscardableItem::Discard, bind(delete_ptr(), _1)) );
>
> after for_each, objects deleted, but Discard function did not been called.
> If using Bind can do the same thing, please tell me. thanks!
> 2009/3/23 Alex MDC <
alex.mdc@gmail.com>
At this point, though you probably *can* do what you want with bind,