Simplify common case of use_future_t that uses std::allocator
authorJonathan Wakely <jwakely@redhat.com>
Thu, 24 Oct 2019 14:39:57 +0000 (15:39 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 24 Oct 2019 14:39:57 +0000 (15:39 +0100)
commit5ce55f3ff5d04834e436a72fb2be84b31aa89def
tree7b16d64999ebbe045ddfea954e0e9e1131ec6672
parentabebffc609506176f8ba3f64533e15ece49446c0
Simplify common case of use_future_t that uses std::allocator

There is no need to store and pass around the allocator object when it's
an instance of std::allocator. Define a partial specialization of
std::use_future_t and the corresponding completion token so that no
allocator is stored. Overload the completion handler constructor to not
expect an allocator to be stored.

* include/experimental/executor (__use_future_ct, use_future_t):
Define partial specializations for std::allocator.
(__use_future_ch): Overload constructor for completion tokens using
std::allocator.

From-SVN: r277404
libstdc++-v3/ChangeLog
libstdc++-v3/include/experimental/executor