All Regions
Argentina
Australia
Austria
Belgium (fr)
Belgium (nl)
Brazil
Bulgaria
Canada (en)
Canada (fr)
Catalonia
Chile
China
Colombia
Croatia
Czech Republic
Denmark
Estonia
Finland
France
Germany
Greece
Hong Kong
Hungary
Iceland
India (en)
Indonesia (en)
Ireland
Israel (en)
Italy
Japan
Korea
Latvia
Lithuania
Malaysia (en)
Mexico
Netherlands
New Zealand
Norway
Pakistan (en)
Peru
Philippines (en)
Poland
Portugal
Romania
Russia
Saudi Arabia
Singapore
Slovakia
Slovenia
South Africa
Spain (ca)
Spain (es)
Sweden
Switzerland (de)
Switzerland (fr)
Taiwan
Thailand (en)
Turkey
US (English)
US (Spanish)
Ukraine
United Kingdom
Vietnam (en)
Any Time
Past Day
Past Week
Past Month
Past Year
std::move_only_function::operator() - cppreference.com
www.en.cppreference.com/w/cpp/utility/functional/move_only_function/operator().html
The following example shows how std::move_only_function can passed to other functions by value. Also, it shows how std::move_only_function can store lambdas.
std::move_only_function::operator= - cppreference.com
en.cppreference.com/w/cpp/utility/functional/move_only_function/operator=
4) Sets the target of * this to the callable f, or destroys the current target if f is a null function pointer, a null pointer to member function, or an empty std::move_only_function, as if by executing move_only_function (std:: forward < F > (f)). swap (* this);.This overload participates in overload resolution only if the constructor of move_only_function from F participates in overload ...
Function objects - cppreference.com
en.cppreference.com/w/cpp/functional.html
2025-05-21T00:00:00.0000000
Transparent function objects. Associative containers and unordered associative containers (since C++20) provide heterogeneous lookup and erasure (since C++23) operations, but they are only enabled if the supplied function object type T is transparent : the qualified identifier T::is_transparent is valid and denotes a type.. All transparent function object types in the standard library ...
std::move_only_function:: move_only_function - en.cppreference.com
www.en.cppreference.com/w/cpp/utility/functional/move_only_function/move_only_function.html
5) Let VT be std:: decay_t < F >.If f is a null function pointer, a null pointer to member value, or an empty std::move_only_function (may be any other specialization), then constructs an empty std::move_only_function.Otherwise, constructs a std::move_only_function whose target is of type VT and direct-non-list-initialized with std:: forward < F > (f).. This overload participates in overload ...
std::function<R(Args...)>::operator() - cppreference.com
en.cppreference.com/w/cpp/utility/functional/function/operator()
2024-10-06T00:00:00.0000000
Throws std::bad_function_call if * this does not store a callable function target, i.e. ! * this == true. [ edit ] Example The following example shows how std::function can be passed to other functions by value.
std::function<R(Args...)>::operator= - cppreference.com
en.cppreference.com/w/cpp/utility/functional/function/operator=
2024-10-07T00:00:00.0000000
< cpp | utility | functional | function ... Even before allocator support was removed from std::function in C++17, these assignment operators use the default allocator rather than the allocator of * this or the allocator of other ... move_only_function) assign (removed in C++17) assigns a new target
std::move_only_function - cppreference.com
www.en.cppreference.com/w/cpp/utility/functional/move_only_function.html
Notes. Implementations may store a callable object of small size within the std::move_only_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.. If a std::move_only_function returning a reference is initialized ...
std::move_only_function:: ~move_only_function - Reference
en.cppreference.com/w/cpp/utility/functional/move_only_function/~move_only_function
Destroys the std::move_only_function object. If the std::move_only_function is not empty, its target is also destroyed. [] See als
std::function<R (Args...)>::~function - cppreference.com
en.cppreference.com/w/cpp/utility/functional/function/~function.html
destroys a std::move_only_function object (public member function of std::move_only_function)
operator==(std::move_only_function) - cppreference.com
en.cppreference.com/w/cpp/utility/functional/move_only_function/operator==
2024-09-01T00:00:00.0000000
Checks whether the wrapper f has a callable target by formally comparing it with std::nullptr_t.Empty wrappers (that is, wrappers without a target) compare equal, non-empty functions compare non-equal. This function is not visible to ordinary unqualified or qualified lookup, and can only be found by argument-dependent lookup when std::move_only_function<FunctionType> is an associated class of ...
Feedback