File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed
Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -272,13 +272,22 @@ namespace stdexec {
272272 requires __none_of<_Ty, _Us...>
273273 using __unless_one_of_t = _Ty;
274274
275+ namespace __detail {
276+ template <class _Alloc >
277+ auto __test_alloc_pointer (int ) -> typename _Alloc::pointer;
278+ template <class _Alloc >
279+ auto __test_alloc_pointer (long ) -> typename _Alloc::value_type*;
280+
281+ template <class _Alloc >
282+ using __alloc_pointer_t = decltype (__detail::__test_alloc_pointer<__decay_t <_Alloc>>(0 ));
283+ } // namespace __detail
284+
275285 template <class _Alloc >
276- concept __allocator =
277- requires (std::remove_cvref_t <_Alloc> __al, std::size_t __n) {
278- {
279- __al.allocate (__n)
280- } -> same_as<std::add_pointer_t <typename std::remove_cvref_t <_Alloc>::value_type>>;
281- __al.deallocate (__al.allocate (__n), __n);
282- } && copy_constructible<std::remove_cvref_t <_Alloc>>
283- && equality_comparable<std::remove_cvref_t <_Alloc>>;
286+ concept __allocator = //
287+ requires (__declfn_t <__decay_t <_Alloc>&> __al, std::size_t __n) {
288+ { __al ().allocate (__n) } -> same_as<__detail::__alloc_pointer_t <_Alloc>>;
289+ __al ().deallocate (__al ().allocate (__n), __n);
290+ } //
291+ && copy_constructible<__decay_t <_Alloc>> //
292+ && equality_comparable<__decay_t <_Alloc>>;
284293} // namespace stdexec
You can’t perform that action at this time.
0 commit comments