A
Andy Venikov
That's what I meant. With "rules out any chance for inlining", I
Sorry for misunderstanding. I interpreted your original comment as if
inlining wouldn't be possible at all for that function.
I don't think I understand you. When you pass a pointer to an object instead
of the pointer to a function, you still have to call operator() through
the object's pointer. It means no inlining is possible for that particular
call. Then how having a functor is better than a pointer to a function?
Andy.
actually meant "rules out any chance for inlining in this place". Where
called directly, the function can indeed be inlined.
Sorry for misunderstanding. I interpreted your original comment as if
inlining wouldn't be possible at all for that function.
Right, but it can be inlined even when called through a pointer, which a
reglar function can't.
I don't think I understand you. When you pass a pointer to an object instead
of the pointer to a function, you still have to call operator() through
the object's pointer. It means no inlining is possible for that particular
call. Then how having a functor is better than a pointer to a function?
Andy.