@@ -114,22 +114,22 @@ inline constexpr bool __is_span_v = false; // true if and only if _Tp is a speci
114114template <class _Tp , size_t _Extent>
115115inline constexpr bool __is_span_v<span<_Tp, _Extent>> = true ;
116116
117- template <class _UType >
117+ template <class >
118118struct __xtype {
119- using type = void ;
119+ using type _LIBCPP_NODEBUG = void ;
120120};
121121template <class _XType >
122122struct __xtype <empty_view<_XType>> {
123- using type = _XType;
123+ using type _LIBCPP_NODEBUG = _XType;
124124};
125125template <class _XType , size_t _Extent>
126126struct __xtype <span<_XType, _Extent>> {
127- using type = _XType;
127+ using type _LIBCPP_NODEBUG = _XType;
128128 constexpr static size_t __extent = _Extent;
129129};
130130template <class _XType >
131131struct __xtype <ref_view<_XType>> {
132- using type = _XType;
132+ using type _LIBCPP_NODEBUG = _XType;
133133};
134134
135135struct __fn : __range_adaptor_closure<__fn> {
@@ -146,12 +146,10 @@ struct __fn : __range_adaptor_closure<__fn> {
146146
147147 template <class _Type >
148148 static consteval pair<__strategy, bool > __choose_strategy () {
149- using _UType = std:: remove_cvref_t <_Type>;
149+ using _UType = remove_cvref_t <_Type>;
150150 using _XType = __xtype<_UType>::type;
151151
152- if constexpr (!requires { typename all_t <_Type>; }) {
153- return {__strategy::__none, false };
154- } else if constexpr (constant_range<all_t <_Type>>) {
152+ if constexpr (requires { requires constant_range<views::all_t <_Type>>; }) {
155153 return {__strategy::__already_const, noexcept (views::all (std::declval<_Type>()))};
156154 } else if constexpr (__is_specialization_v<_UType, empty_view>) {
157155 return {__strategy::__empty_view, true };
@@ -162,16 +160,18 @@ struct __fn : __range_adaptor_closure<__fn> {
162160 } else if constexpr (is_lvalue_reference_v<_Type> && constant_range<const _UType> && !view<_UType>) {
163161 return {__strategy::__const_is_constant_range,
164162 noexcept (ref_view (static_cast <const _UType&>(std::declval<_Type>())))};
165- } else {
163+ } else if ( requires { as_const_view (std::declval<_Type>()); }) {
166164 return {__strategy::__otherwise, noexcept (as_const_view (std::declval<_Type>()))};
165+ } else {
166+ return {__strategy::__none, false };
167167 }
168168 }
169169
170170 template <class _Type >
171171 requires (__choose_strategy<_Type>().first != __strategy::__none)
172172 [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr static auto
173173 operator ()(_Type&& __range) noexcept (__choose_strategy<_Type>().second) {
174- using _UType = std:: remove_cvref_t <_Type>;
174+ using _UType = remove_cvref_t <_Type>;
175175 using _XType = __xtype<_UType>::type;
176176
177177 constexpr auto __st = __choose_strategy<_Type>().first ;
0 commit comments