Functor

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.

Advertisements

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.

Advertisements

Related Terms

Latest Programming Languages Terms

Related Reading

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…