Boost logo

Boost Users :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2006-05-12 17:46:04

"jbd" <evadream.mlist_at_[hidden]> wrote

>> Peter Dimov wrote:
>> It isn't clear why do you need to bind bar2 at all, instead of just
>> using boost::function < void (int) > f3( &bar2 ) ;
>To make a long story short, i'd like people
>always use the same mecanism (syntax), not a boost::bind here and nothing

I would disagree with this approach. First it introduces unnecessary
runtime and compile time performance overhead. More importantly, as great
as boost::bind is, it is just a mechanism for making function objects.
There are other mechanisms, like, for example, STL binders and adapters,
boost::lambda or writing your own function object. A function pointer can
be used directly, since function objects are modeled after it in the first

Using boost::bind when it is not required might produce the code that is
more difficult to understand and maintain.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at