T B H P N

FunctionObjects.h, FunctionObjects.cpp, FunctionObjects.txt, Code folder

Function objects are objects that can be invoked.
This demo illustrates the use of function pointers, functors, and lambdas.

FunctionObjects.txt

    
  Demonstrate Function Objects
 ==============================

  line number 26 : calling testFunction with message "function demo"

  line number 30 : calling testFunction with message "function pointer demo"

  line number 34 : calling testFunction with message "function pointer type demo"

  line number 38 : calling testFunction with message "function pointer alias demo"

  line number 42 : calling testFunction with message "functor demo"
    by calling FunctorExample::operator () with argument "additional message"

  line number 48 : calling testFunction with message "lambda demo"
    by calling "main::<lambda_59f79817bc7956e17ef76bde00917d48>::operator ()

  Press any key to continue . . .