Functor
Definitions
1
Posts
1
Posters
57
Views
-
A functor, or function object, is a class in C with the () [operator] [overloaded]. Functors are used a lot in the standard library to do custom comparisons. Theyre used in place of function [pointers] because sometimes you need to store a value or remember something (ie. put the functor into a special state for whatever purpose), a functor can do this, a function pointer cant (without messing with global variables).
Explore More Definitions
Browse our collection of 300,000+ community-written definitions