A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../named_req/Callable.html below:

C++ named requirements: Callable - cppreference.com

A Callable type is a type for which the INVOKE and INVOKE<R> operations (used by, e.g., std::function, std::bind, and std::thread::thread) are applicable.

INVOKE can be performed explicitly using the library function std::invoke.

(since C++17)

INVOKE<R> can be performed explicitly using the library function std::invoke_r.

(since C++23) [edit] Requirements

The type T satisfies Callable if

Given

The following expressions must be valid:

Expression Requirements INVOKE<R>(f, std::declval<ArgTypes>()...) The expression is well-formed in unevaluated context. [edit] Notes

Pointers to data members are Callable, even though no function calls take place.

[edit] Standard library

In addition, the following standard library facilities accept any Callable type (not just FunctionObject):

copyable wrapper of any copy constructible callable object
(class template) [edit] move-only wrapper of any callable object that supports qualifiers in a given call signature
(class template) [edit] copyable wrapper of any copy constructible callable object that supports qualifiers in a given call signature
(class template) [edit] non-owning wrapper of any callable object
(class template) [edit] binds one or more arguments to a function object
(function template) [edit] bind a variable number of arguments, in order, to a function object
(function template) [edit] CopyConstructible and CopyAssignable reference wrapper
(class template) [edit]

(C++11)(removed in C++20)(C++17)

deduces the result type of invoking a callable object with a set of arguments
(class template) [edit] manages a separate thread
(class) [edit] std::thread with support for auto-joining and cancellation
(class) [edit] invokes a function only once even if called from multiple threads
(function template) [edit] runs a function asynchronously (potentially in a new thread) and returns a std::future that will hold the result
(function template) [edit] packages a function to store its return value for asynchronous retrieval
(class template) [edit] [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