Подорожуй з gofrie.com

Generalized Functor

In brief, a generalized functor is any processing invocation that C++ allows, encapsulated as a typesafe first-class object. In a more detailed definition, a generalized functor that

  • Encapsulates any processing invocation because it accepts pointers to simple functions, pointers to member functions, functors, and even other generalized functors—together with some or all of their respective arguments.
  • Is typesafe because it never matches the wrong argument types to the wrong functions.
  • Is an object with value semantics because it fully supports copying, assignment, and pass by value. A generalized functor can be copied freely and does not expose virtual member functions.

Implementation#1 (using Loki library)
Implementation#2 (Functional tester, briefly analyze the possibility to combine several common functional objects in the context of a conventional tester as at compile time and at runtime.)
Reporter: Danylo Fitel