
2 May
2006
2 May
'06
4:58 p.m.
"Arkadiy Vertleyb" <vertleyb@hotmail.com> writes:
"Neal Becker" <ndbecker2@gmail.com> 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).
Actually it's not a virtual call, it's a call through a function pointer. That's one less indirection. -- Dave Abrahams Boost Consulting www.boost-consulting.com