std::packaged_task::valid

bool valid() const; (since C++11) Checks whether *this has a shared state. Parameters (none). Return value true if *this has a shared state, false otherwise. Exceptions noexcept specification: noexcept

std::packaged_task::swap

void swap( packaged_task& other ); (since C++11) Exchanges the shared states and stored tasks of *this and other. Parameters other - packaged task whose state to swap with Return value (none). Exceptions noexcept specification: noexcept See also std::swap(std::packaged_task) (C++11) specializes the std::swap algorithm (function template)

std::packaged_task::reset

void reset(); (since C++11) Resets the state abandoning the results of previous executions. New shared state is constructed. Equivalent to *this = packaged_task(std::move(f)), where f is the stored task. Parameters (none). Return value (none). Exceptions std::future_error if *this has no shared state. The error condition is set to no_state. std::bad_alloc if there was not enough memory for a new shared state. any exception thrown by the move constructor of the new package

std::packaged_task::packaged_task

packaged_task(); (1) (since C++11) template <class F> explicit packaged_task( F&& f ); (2) (since C++11) (3) template <class F, class Allocator> explicit packaged_task( std::allocator_arg_t, const Allocator& a, F&& f ); (since C++11) (until C++17) template <class F, class Allocator> packaged_task( std::allocator_arg_t, const Allocator& a, F&& f ); (since C++17) (4) packaged_task( packaged_task& ) = delete; (sinc

std::packaged_task::make_ready_at_thread_exit

void make_ready_at_thread_exit( ArgTypes... args ); (since C++11) Calls the stored task with forwarded args as the arguments. The return value of the task or any exception thrown by it is stored in the shared state of *this. The shared state is only made ready after the current thread exits and all objects of thread local storage duration are destroyed. Parameters args - the parameters to pass on invocation of the stored task Return value (none). Exceptions std::future_

std::packaged_task::get_future

std::future<R> get_future(); (since C++11) Returns a future which shares the same shared state as *this. get_future can be called only once for each packaged_task. Parameters (none). Return value A future which shares the same shared state as *this. Exceptions std::future_error on the following error conditions: The shared state has already been retrieved via a call to get_future. The error category is set to future_already_retrieved. *this has no shared state. The err

std::packaged_task

Defined in header <future> template< class > class packaged_task; //not defined (1) (since C++11) template< class R, class ...Args > class packaged_task<R(Args...)>; (2) (since C++11) The class template std::packaged_task wraps any Callable target (function, lambda expression, bind expression, or another function object) so that it can be invoked asynchronously. Its return value or exception thrown is stored in a shared state which can be accessed t

std::owner_less

Defined in header <memory> template<> struct owner_less<void>; (since C++17) std::owner_less<> is a specialization of std::owner_less with parameter types deduced. Member types Member type Definition is_transparent /* unspecified */ Notes The member type is_transparent indicates to the caller that this function object is a transparent function object: it accepts arguments of arbitrary types and uses perfect forwarding, which avoids unnece

std::owner_less

Defined in header <memory> (1) template< class T > struct owner_less; /* undefined */ (since C++11) (until C++17) template< class T = void > struct owner_less; /* undefined */ (since C++17) template< class T > struct owner_less<std::shared_ptr<T>>; (2) (since C++11) template< class T > struct owner_less<std::weak_ptr<T>>; (3) (since C++11) template<> struct owner_less<void>; (4) (since C++17)

std::overflow_error

Defined in header <stdexcept> class overflow_error; Defines a type of object to be thrown as exception. It can be used to report arithmetic overflow errors (that is, situations where a result of a computation is too large for the destination type). The only standard library components that throw this exception are std::bitset::to_ulong and std::bitset::to_ullong. The mathematical functions of the standard library components do not throw this exception (mathematical function