std::experi...damentalsTS)(3)
π std::experimental::packaged_task(libraryfundamentalsTS) π
okay so bestie, this is the std::experi...damentalsTS)(3) page from the C++ Standard Libary, and we are literally here for std::experimental::packaged_task. itβs giving experimental-TS main character energy, and weβre gonna keep every detail, no cap. π«Ά
πΈ NAME πΈ
std::experimental::packaged_task(libraryfundamentalsTS) β std::experimental::packaged_task(libraryfundamentalsTS)
β¨ Synopsis β¨
the whole synopsis vibe is right here, bestie:
Defined in header <experimental/future>
template< class > class packaged_task; //not defined (1) (library
fundamentals TS)
template< class R, class ...Args > (2) (library
fundamentals TS)
class packaged_task<R(Args...)>;
so std::experimental::fundamentals_v1::packaged_task (and std::experimental::fundamentals_v2::packaged_task) is a modified version of std::packaged_task provided by the library fundamentals TS with support for type-erased allocators. literally the whole plot. π
π Member types π
allocator_typeβ definition:std::experimental::erased_typeβ¨
π Member functions π
constructorβ constructs the task object (public member function)get_memory_resourceβ retrieves a pointer to the memory resource used by this object to allocate memory (public member function)
π Non-member function π
std::experimental::swap(std::experimental::packaged_task)β specializes the swap algorithm (function template)
π§ Helper classes π§
std::uses_allocator<std::experimental::packaged_task>β specializes thestd::uses_allocatortype trait (class template specialization)
π Members identical to std::packaged_task π
these are the members that are identical to std::packaged_task, and yes, we are listing every single one. periodt. π
π Member functions π
- destructor β destructs the task object (public member function of
std::packaged_task<R(Args...)>) operator=β moves the task object (public member function ofstd::packaged_task<R(Args...)>)validβ checks if the task object has a valid function (public member function ofstd::packaged_task<R(Args...)>)swapβ swaps two task objects (public member function ofstd::packaged_task<R(Args...)>)
π¦ Getting the result π¦
get_futureβ returns astd::futureassociated with the promised result (public member function ofstd::packaged_task<R(Args...)>)
π₯ Execution π₯
operator()β executes the function (public member function ofstd::packaged_task<R(Args...)>)make_ready_at_thread_exitβ executes the function ensuring that the result is ready only once the current thread exits (public member function ofstd::packaged_task<R(Args...)>)resetβ resets the state abandoning any stored results of previous executions (public member function ofstd::packaged_task<R(Args...)>)
source/version/date sign-off, bestie: this page is from http://cppreference.com, dated 2024.06.10, under the std::experi...damentalsTS)(3) manual. thatβs the whole footer vibe πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms