Boost logo

Boost Users :

From: Jens Theisen (jth02_at_[hidden])
Date: 2006-09-16 09:45:09


Alexander Shyrokov <shirokov_at_[hidden]> writes:

> Is it possible to convert boost::bind(&TMap::value_type::second,_1) to a
> function object or a typedef name?

Yes:

  boost::function< void (TMap::value_type) >
    proc = boost::bind(f, boost::bind(&TMap::value_type::second, _1));

would do it if the signatures did match (f is taking char*, not char).

Also, some boost:: q are redundant (ADL):

  boost::function< void (TMap::value_type) >
    proc = bind(f, bind(&TMap::value_type::second, _1));

Regards,

Jens


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