@@ -123,46 +123,45 @@ namespace stdexec {
123123
124124 template <class _Mbr , class _Class , class _Ty >
125125 auto __invoke_selector (_Mbr _Class::*, const _Ty&) noexcept {
126- if constexpr (STDEXEC_IS_CONST (_Mbr) || STDEXEC_IS_CONST (_Mbr const )) {
126+ if constexpr (STDEXEC_IS_FUNCTION (_Mbr)) {
127127 // member function ptr case
128128 if constexpr (STDEXEC_IS_BASE_OF (_Class, _Ty)) {
129- return __memobj {};
129+ return __memfn {};
130130 } else if constexpr (__is_refwrap<_Ty>) {
131- return __memobj_refwrap {};
131+ return __memfn_refwrap {};
132132 } else {
133- return __memobj_smartptr {};
133+ return __memfn_smartptr {};
134134 }
135135 } else {
136136 // member object ptr case
137137 if constexpr (STDEXEC_IS_BASE_OF (_Class, _Ty)) {
138- return __memfn {};
138+ return __memobj {};
139139 } else if constexpr (__is_refwrap<_Ty>) {
140- return __memfn_refwrap {};
140+ return __memobj_refwrap {};
141141 } else {
142- return __memfn_smartptr {};
142+ return __memobj_smartptr {};
143143 }
144144 }
145145 }
146146
147147 struct __invoke_t {
148148 template <class _Fun >
149- STDEXEC_ATTRIBUTE ((always_inline)) constexpr auto
150- operator ()(_Fun&& __fun) const noexcept (noexcept ((static_cast <_Fun&&>(__fun))()))
151- -> decltype((static_cast <_Fun&&>(__fun))()) {
149+ STDEXEC_ATTRIBUTE ((always_inline)) constexpr auto operator ()(_Fun&& __fun) const
150+ noexcept (noexcept (static_cast <_Fun&&>(__fun)())) -> decltype(static_cast <_Fun&&>(__fun)()) {
152151 return static_cast <_Fun&&>(__fun)();
153152 }
154153
155154 template <class _Fun , class _Ty , class ... _Args>
156- STDEXEC_ATTRIBUTE ((always_inline)) constexpr auto operator ()(_Fun&& __fun, _Ty&& __ty, _Args&&... __args) const
157- noexcept (noexcept (__invoke_selector(__fun, __ty)(
155+ STDEXEC_ATTRIBUTE ((always_inline)) constexpr auto operator ()(_Fun&& __fun, _Ty&& __ty, _Args&&... __args) const
156+ noexcept (noexcept (__invoke_:: __invoke_selector(__fun, __ty)(
158157 static_cast <_Fun&&>(__fun),
159158 static_cast<_Ty&&>(__ty),
160159 static_cast<_Args&&>(__args)...)))
161- -> decltype(__invoke_selector(__fun, __ty)(
160+ -> decltype(__invoke_:: __invoke_selector(__fun, __ty)(
162161 static_cast <_Fun&&>(__fun),
163162 static_cast<_Ty&&>(__ty),
164163 static_cast<_Args&&>(__args)...)) {
165- return decltype (__invoke_selector (__fun, __ty))()(
164+ return decltype (__invoke_:: __invoke_selector (__fun, __ty))()(
166165 static_cast <_Fun&&>(__fun), static_cast <_Ty&&>(__ty), static_cast <_Args&&>(__args)...);
167166 }
168167 };
@@ -230,25 +229,4 @@ namespace stdexec {
230229 };
231230
232231 inline constexpr __apply_t __apply{};
233-
234- template <class _Tag , class _Ty >
235- struct __field {
236- STDEXEC_ATTRIBUTE ((always_inline)) _Ty operator ()(_Tag) const noexcept (__nothrow_decay_copyable<const _Ty&>) {
237- return __t_;
238- }
239-
240- _Ty __t_;
241- };
242-
243- template <class _Tag >
244- struct __mkfield_ {
245- template <class _Ty >
246- STDEXEC_ATTRIBUTE ((always_inline)) __field<_Tag, __decay_t <_Ty>>
247- operator ()(_Ty&& __ty) const noexcept (__nothrow_decay_copyable<_Ty>) {
248- return {static_cast <_Ty&&>(__ty)};
249- }
250- };
251-
252- template <class _Tag >
253- inline constexpr __mkfield_<_Tag> __mkfield{};
254232} // namespace stdexec
0 commit comments