Work

Function objects, function templates, and passage by behavior in C++

Year: 1997
Type: conference-paper
Abstract: Passing functions and function objects to general purpose routines is a powerful abstraction mechanism that should be taught in freshman computer science. In C++, a "function" can be defined directly by the user or by a library or can be defined indirectly via operator() as a member function of a class. It is not obvious how to treat these "functions" in a uniform manner. We will show how function templates in C++ provide an elegant and teachable mechanism for passing entities with functional behavior as arguments to other functions.
Language: English
Open Access status: bronze
OpenAlex ID: W2069762894
FWCI: 4.79
Cites: 7
Cited by: 10
Related to: 10