
3 May
2006
3 May
'06
4:29 a.m.
Arkadiy Vertleyb wrote:
"Doug Gregor" <dgregor@cs.indiana.edu> wrote
boost::function doesn't use virtual functions, but the effect is the same. boost::function adds one additional indirect call through a function pointer.
Sorry for the inaccurate response.
Out of curiousity, is this technique described anywhere (other than the code)? It's hard to imagine the way to erase the type of a functor without some kind of a polymorphic adaptor...
FWIW, I also had the same curiosity and then roughly discribed the comparison of virtual way between Boost.Function way: http://tinyurl.com/ntf7x -- Shunsuke Sogame