Namespaces
Variants
Views
Actions

C++ named requirements: FunctionObject

From cppreference.com
< cppβ€Ž | named req
 
 
C++ named requirements
Basic
Type properties
Library-Wide
Container
Container Elements
Iterator
Stream I/O
Random Numbers
Concurrency
(C++11)

(C++11)
(C++11)
Other
 

A FunctionObject type is the type of an object that can be used on the left of the function call operator.

[edit] Requirements

The type T satisfies FunctionObject if

Given

  • f, a value of type T or const T
  • args, suitable argument list, which may be empty

The following expressions must be valid:

Expression Requirements
f(args) performs a function call

[edit] Notes

Functions and references to functions are not function object types, but can be used where function object types are expected due to function-to-pointer implicit conversion.

[edit] Standard library