Skip to content

U) STL Functors

kalinosia edited this page Mar 16, 2021 · 1 revision

What is a functor?

  • Something which can be treated as a function
  • Can be invoked with set of parameters by operator ()
  • When invoked, can return some value

Example:

  • Ordinary function
  • Object of a class/struct with overloaded invoke operator
  • Lambda expression

Clone this wiki locally