0

Function object could be any of the 3 : lambda expression, functor (classes overloaded operator ()), and std::function.

I understand that in a template, if a parameter type is defined as std::function, it could take parameter of any of the three.

for example, a type defined by typedef std::function<bool(Logger&)> FilterStdFunction; will be more general than typedef bool(*FilterFunctionPointer)(Logger&); when used as a template parameter.

But would there be performance loss? such as impossible to inline it?

athos
  • 6,120
  • 5
  • 51
  • 95

0 Answers0