Sciweavers

SIGCSE
1997
ACM

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

14 years 3 months ago
Function objects, function templates, and passage by behavior in C++
Passing functions and function objects to general 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.
Richard Rasala
Added 07 Aug 2010
Updated 07 Aug 2010
Type Conference
Year 1997
Where SIGCSE
Authors Richard Rasala
Comments (0)