R operator()( Args... args ) const;
(since C++11)Invokes the stored callable function target with the parameters args.
Effectively does INVOKE<R>(f, std::forward<Args>(args)...), where f is the target object of *this.
[edit] Parameters args - parameters to pass to the stored callable function target [edit] Return valueNone if R
is void. Otherwise the return value of the invocation of the stored callable object.
Throws std::bad_function_call if *this does not store a callable function target, i.e. !*this == true.
[edit] ExampleThe following example shows how std::function can be passed to other functions by value. Also, it shows how std::function can store lambdas.
Possible output:
bad_function_call 1 2 42 Hi 42[edit] See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4