File tree Expand file tree Collapse file tree 7 files changed +11
-0
lines changed
test/std/ranges/range.access Expand file tree Collapse file tree 7 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 9
9
#ifndef _LIBCPP___RANGES_DATA_H
10
10
#define _LIBCPP___RANGES_DATA_H
11
11
12
+ #include < __concepts/class_or_enum.h>
12
13
#include < __config>
13
14
#include < __iterator/concepts.h>
14
15
#include < __iterator/iterator_traits.h>
@@ -35,6 +36,7 @@ namespace __data {
35
36
template <class _Tp >
36
37
concept __member_data =
37
38
__can_borrow<_Tp> &&
39
+ __workaround_52970<_Tp> &&
38
40
requires (_Tp&& __t ) {
39
41
{ _LIBCPP_AUTO_CAST (__t .data ()) } -> __ptr_to_object;
40
42
};
Original file line number Diff line number Diff line change @@ -307,7 +307,9 @@ static_assert(noexcept(std::ranges::cbegin(brar)));
307
307
struct Incomplete ;
308
308
template <class T > struct Holder { T t; };
309
309
static_assert (!std::is_invocable_v<RangeBeginT, Holder<Incomplete>*>);
310
+ static_assert (!std::is_invocable_v<RangeBeginT, Holder<Incomplete>*&>);
310
311
static_assert (!std::is_invocable_v<RangeCBeginT, Holder<Incomplete>*>);
312
+ static_assert (!std::is_invocable_v<RangeCBeginT, Holder<Incomplete>*&>);
311
313
312
314
int main (int , char **) {
313
315
static_assert (testReturnTypes ());
Original file line number Diff line number Diff line change @@ -210,12 +210,14 @@ constexpr bool testViaRangesBegin() {
210
210
struct Incomplete ;
211
211
template <class T > struct Holder { T t; };
212
212
static_assert (!std::is_invocable_v<RangeDataT, Holder<Incomplete>*>);
213
+ static_assert (!std::is_invocable_v<RangeDataT, Holder<Incomplete>*&>);
213
214
214
215
struct RandomButNotContiguous {
215
216
random_access_iterator<int *> begin () const ;
216
217
random_access_iterator<int *> end () const ;
217
218
};
218
219
static_assert (!std::is_invocable_v<RangeDataT, RandomButNotContiguous>);
220
+ static_assert (!std::is_invocable_v<RangeDataT, RandomButNotContiguous&>);
219
221
220
222
int main (int , char **) {
221
223
static_assert (testReturnTypes ());
Original file line number Diff line number Diff line change @@ -172,6 +172,7 @@ constexpr bool testBeginEqualsEnd() {
172
172
struct Incomplete ;
173
173
template <class T > struct Holder { T t; };
174
174
static_assert (!std::is_invocable_v<RangeEmptyT, Holder<Incomplete>*>);
175
+ static_assert (!std::is_invocable_v<RangeEmptyT, Holder<Incomplete>*&>);
175
176
176
177
int main (int , char **) {
177
178
testEmptyMember ();
Original file line number Diff line number Diff line change @@ -357,7 +357,9 @@ static_assert(noexcept(std::ranges::cend(erar)));
357
357
struct Incomplete ;
358
358
template <class T > struct Holder { T t; };
359
359
static_assert (!std::is_invocable_v<RangeEndT, Holder<Incomplete>*>);
360
+ static_assert (!std::is_invocable_v<RangeEndT, Holder<Incomplete>*&>);
360
361
static_assert (!std::is_invocable_v<RangeCEndT, Holder<Incomplete>*>);
362
+ static_assert (!std::is_invocable_v<RangeCEndT, Holder<Incomplete>*&>);
361
363
362
364
int main (int , char **) {
363
365
static_assert (testReturnTypes ());
Original file line number Diff line number Diff line change @@ -318,6 +318,7 @@ constexpr bool testRanges() {
318
318
struct Incomplete ;
319
319
template <class T > struct Holder { T t; };
320
320
static_assert (!std::is_invocable_v<RangeSizeT, Holder<Incomplete>*>);
321
+ static_assert (!std::is_invocable_v<RangeSizeT, Holder<Incomplete>*&>);
321
322
322
323
int main (int , char **) {
323
324
testArrayType ();
Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ constexpr bool test() {
82
82
struct Incomplete ;
83
83
template <class T > struct Holder { T t; };
84
84
static_assert (!std::is_invocable_v<RangeSSizeT, Holder<Incomplete>*>);
85
+ static_assert (!std::is_invocable_v<RangeSSizeT, Holder<Incomplete>*&>);
85
86
86
87
int main (int , char **) {
87
88
test ();
You can’t perform that action at this time.
0 commit comments