Don't miss an insight. Subscribe to Techopedia for free.



What Does Functor Mean?

A functor is a type of class in C++ that acts like a function. Experts point out that a functor is created by overloading the operator and passing one argument the way that one would to a conventional function, albeit with different results.


Techopedia Explains Functor

One way to talk about the use of a functor is that functors work as an alternative to global variables in passing more than one argument through a single parameter. Functors may be used in combination with standard template libraries in order to achieve these types of results.

For example, the use of a functor might influence how a developer or engineer adds values to an array through a particular function-oriented workflow. Another way to explain this is that functors can be valuable in terms of "mapping" data through an array approach or other format.


Related Terms