@@ -181,15 +181,24 @@ concept __all_bidirectional = (bidirectional_range<__maybe_const<_Const, _Views>
181
181
template <bool _Const, class ... _Views>
182
182
concept __all_forward = (forward_range<__maybe_const<_Const, _Views>> && ...);
183
183
184
- template <bool _Const, class ... _First, class _Tail >
184
+ template <bool _Const, class _First , class ... _Tail>
185
+ struct __all_common_ignore_last {
186
+ static constexpr bool value =
187
+ common_range<__maybe_const<_Const, _First>> && __all_common_ignore_last<_Const, _Tail...>::value;
188
+ };
189
+
190
+ template <bool _Const, class _Tail >
191
+ struct __all_common_ignore_last <_Const, _Tail> {
192
+ static constexpr bool value = true ;
193
+ };
194
+
195
+ template <bool _Const, class ... _Rs>
185
196
concept __concat_is_random_access =
186
- (__all_random_access<_Const, _First> && ... && __all_random_access<_Const, _Tail>) &&
187
- (common_range<__maybe_const<_Const, _First>> && ...);
197
+ (__all_random_access<_Const, _Rs...>) && (__all_common_ignore_last<_Const, _Rs...>::value);
188
198
189
- template <bool _Const, class ... _First, class _Tail >
199
+ template <bool _Const, class ... _Rs >
190
200
concept __concat_is_bidirectional =
191
- (__all_bidirectional<_Const, _First> && ... && __all_random_access<_Const, _Tail>) &&
192
- (common_range<__maybe_const<_Const, _First>> && ...);
201
+ (__all_bidirectional<_Const, _Rs...>) && (__all_common_ignore_last<_Const, _Rs...>::value);
193
202
194
203
# endif // _LIBCPP_STD_VER >= 23
195
204
0 commit comments