Boost logo

Boost :

From: Neal Becker (ndbecker2_at_[hidden])
Date: 2006-05-02 10:47:48


Arkadiy Vertleyb wrote:

> "Neal Becker" <ndbecker2_at_[hidden]> wrote
>
>> I'd like to use boost::function to wrap (pointer to) function to pass to
>> template functions that expect function objects. I'm just wondering,
>> though, if using boost::function wrapper will introduce additional
> overhead
>> into the function call?
>
> boost::function will introduce an extra virtual function call (which is
> not a big deal in most cases).
>
OK, thanks.

> But why do you need to wrap your pointer? Can't you pass it directly? It
> would be treated exactly the same way as the function object...
>
You're right. Sorry for the stupid example. I should probably not post
until I wake up.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk