diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2022-09-27 11:25:51 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2022-09-27 11:59:53 +0100 |
commit | 614e5696d730a65998ff5b0373f905795a758dd6 (patch) | |
tree | e9e70d82b615bffeb186e73a7cb88c189ec4432c /libstdc++-v3/include/std/future | |
parent | b939a5cc4143908ddda4b85a848c313136ff6e0c (diff) | |
download | gcc-614e5696d730a65998ff5b0373f905795a758dd6.zip gcc-614e5696d730a65998ff5b0373f905795a758dd6.tar.gz gcc-614e5696d730a65998ff5b0373f905795a758dd6.tar.bz2 |
libstdc++: Adjust deduction guides for static operator() [PR106651]
Adjust the deduction guides for std::function and std::packaged_task to
work with static call operators. This finishes the implementation of
P1169R4 for C++23.
libstdc++-v3/ChangeLog:
PR c++/106651
* include/bits/std_function.h (__function_guide_t): New alias
template.
[__cpp_static_call_operator] (__function_guide_static_helper):
New class template.
(function): Use __function_guide_t in deduction guide.
* include/std/future (packaged_task): Use __function_guide_t in
deduction guide.
* testsuite/20_util/function/cons/deduction_c++23.cc: New test.
* testsuite/30_threads/packaged_task/cons/deduction_c++23.cc:
New test.
Diffstat (limited to 'libstdc++-v3/include/std/future')
-rw-r--r-- | libstdc++-v3/include/std/future | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future index a1b2d7f..cf08c15 100644 --- a/libstdc++-v3/include/std/future +++ b/libstdc++-v3/include/std/future @@ -1649,8 +1649,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Res, typename... _ArgTypes> packaged_task(_Res(*)(_ArgTypes...)) -> packaged_task<_Res(_ArgTypes...)>; - template<typename _Fun, typename _Signature = typename - __function_guide_helper<decltype(&_Fun::operator())>::type> + template<typename _Fun, typename _Signature + = __function_guide_t<_Fun, decltype(&_Fun::operator())>> packaged_task(_Fun) -> packaged_task<_Signature>; #endif |