Boost logo

Boost Users :

Subject: Re: [Boost-users] Function or Bind question
From: Mickael Wolff (mickael_at_[hidden])
Date: 2010-08-14 06:53:21


Le 13/08/2010 17:49, John Dlugosz a écrit :

> What am I missing?

   A good C++ book :) Like Effective STL from Scott Meyers, Item 41.

   In short, you must adapt your function with std::mem_fun_ref. But
boost offer more powerfull solution (bind), then you can write:

   C c ;
   // ...
   verbode_thing.notifier(boost::bind(&C::bar, boost::ref(c), _1) )

   More details at
<http://www.boost.org/doc/libs/1_43_0/libs/bind/bind.html>

-- 
Mickaël Wolff aka Lupus Michaelis
Racine <http://lupusmic.org>
Blog   <http://blog.lupusmic.org>

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net