template< class... >
class copyable_function; // not defined
class copyable_function<R(Args...)>;
template< class R, class... Args >
class copyable_function<R(Args...) noexcept>;
template< class R, class... Args >
class copyable_function<R(Args...) &>;
template< class R, class... Args >
class copyable_function<R(Args...) & noexcept>;
template< class R, class... Args >
class copyable_function<R(Args...) &&>;
template< class R, class... Args >
class copyable_function<R(Args...) && noexcept>;
template< class R, class... Args >
class copyable_function<R(Args...) const>;
template< class R, class... Args >
class copyable_function<R(Args...) const noexcept>;
template< class R, class... Args >
class copyable_function<R(Args...) const &>;
template< class R, class... Args >
class copyable_function<R(Args...) const & noexcept>;
template< class R, class... Args >
class copyable_function<R(Args...) const &&>;
template< class R, class... Args >
Class template std::copyable_function
is a general-purpose polymorphic function wrapper. std::copyable_function
objects can store and invoke any CopyConstructible Callable target â functions, lambda expressions, bind expressions, or other function objects, as well as pointers to member functions and pointers to member objects.
The stored callable object is called the target of std::copyable_function
. If a std::copyable_function
contains no target, it is called empty. Unlike std::function, invoking an empty std::copyable_function
results in undefined behavior.
std::copyable_function
s supports every possible combination of cv-qualifiers (not including volatile), ref-qualifiers, and noexcept-specifiers provided in its template parameter. These qualifiers and specifier (if any) are added to its operator()
.
std::copyable_function
satisfies the requirements of CopyConstructible and CopyAssignable.
result_type
R
[edit] Member functions constructs a new std::copyable_function
object
std::copyable_function
object
std::copyable_function
objects
std::copyable_function
has a target
Implementations may store a callable object of small size within the std::copyable_function
object. Such small object optimization is effectively required for function pointers and std::reference_wrapper specializations, and can only be applied to types T
for which std::is_nothrow_move_constructible_v<T> is true.
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