Namespaces
Variants
Views
Actions

Talk:cpp/thread/promise

From cppreference.com

[edit] Missing "deleted in C++17" for std::promise's uses_allocator?

I see that, unlike std::packaged_task, the helper class uses_allocator is not deleted for std::promise. Is this an omission?

Furthermore, notice that the menu for std::packaged_task for uses_allocator says that it is "until C++17", BUT the description in the main page for std::packaged_task does not reflect that. It is UNTIL one goes to uses_allocator that one can see that it has been deleted.

Is it the same case with std::promise?


ticotico (talk) 07:01, 25 August 2021 (PDT)

std::promise's uses_allocator is still there in current C++23 draft; futures.promise/4. Packaged_task's uses_allocator was removed by lwg2976, itself a cleanup after lwg2921. The main page for packaged_task is cpp/thread/packaged_task and it shows "until C++17" where it says
specializes the std::uses_allocator type trait
(class template specialization) [edit]

--Cubbi (talk) 12:17, 26 August 2021 (PDT)