Lines Matching refs:views

27 namespace views = std::ranges::views;
33 using views::__adaptor::__adaptor_has_simple_extra_args; in test01()
35 static_assert(__adaptor_has_simple_extra_args<decltype(views::transform), identity>); in test01()
36 static_assert(__adaptor_has_simple_extra_args<decltype(views::filter), identity>); in test01()
37 static_assert(__adaptor_has_simple_extra_args<decltype(views::drop), int>); in test01()
38 static_assert(__adaptor_has_simple_extra_args<decltype(views::take), int>); in test01()
39 static_assert(__adaptor_has_simple_extra_args<decltype(views::take_while), identity>); in test01()
40 static_assert(__adaptor_has_simple_extra_args<decltype(views::drop_while), identity>); in test01()
41 static_assert(__adaptor_has_simple_extra_args<decltype(views::lazy_split), std::string_view>); in test01()
42 static_assert(__adaptor_has_simple_extra_args<decltype(views::lazy_split), char>); in test01()
43 static_assert(!__adaptor_has_simple_extra_args<decltype(views::lazy_split), std::string>); in test01()
45 using views::__adaptor::__closure_has_simple_call_op; in test01()
46 __closure_has_simple_call_op auto a00 = views::all; in test01()
47 __closure_has_simple_call_op auto a01 = views::transform(std::identity{}); in test01()
48 __closure_has_simple_call_op auto a02 = views::filter(std::identity{}); in test01()
49 __closure_has_simple_call_op auto a03 = views::drop(42); in test01()
50 __closure_has_simple_call_op auto a04 = views::take(42); in test01()
51 __closure_has_simple_call_op auto a05 = views::take_while(std::identity{}); in test01()
52 __closure_has_simple_call_op auto a06 = views::drop_while(std::identity{}); in test01()
53 __closure_has_simple_call_op auto a07 = views::join; in test01()
54 __closure_has_simple_call_op auto a08 = views::common; in test01()
55 __closure_has_simple_call_op auto a09 = views::reverse; in test01()
56 __closure_has_simple_call_op auto a10 = views::keys; in test01()
57 __closure_has_simple_call_op auto a11 = views::lazy_split(' '); in test01()
58 __closure_has_simple_call_op auto a11a = views::split(' '); in test01()
65 auto a12 = views::lazy_split(s); in test01()
71 auto a12a = views::split(s); in test01()
85 views::transform(badarg)(x); // { dg-error "no match" } in test02()
86 views::filter(badarg)(x); // { dg-error "no match" } in test02()
87 views::take_while(badarg)(x); // { dg-error "no match" } in test02()
88 views::drop_while(badarg)(x); // { dg-error "no match" } in test02()
90 (views::transform(badarg) | views::all)(x); // { dg-error "no match" } in test02()
91 (views::filter(badarg) | views::all)(x); // { dg-error "no match" } in test02()
92 (views::take_while(badarg) | views::all)(x); // { dg-error "no match" } in test02()
93 (views::drop_while(badarg) | views::all)(x); // { dg-error "no match" } in test02()
99 views::lazy_split(badarg)(x); // { dg-error "deleted function" } in test02()
100 (views::lazy_split(badarg) | views::all)(x); // { dg-error "deleted function" } in test02()
101 auto a0 = views::lazy_split(badarg); in test02()
103 auto a1 = a0 | views::all; in test02()
106 views::split(badarg)(x); // { dg-error "deleted function" } in test02()
107 (views::split(badarg) | views::all)(x); // { dg-error "deleted function" } in test02()
108 auto a0a = views::split(badarg); in test02()
110 auto a1a = a0a | views::all; in test02()
113 views::take(badarg)(x); // { dg-error "deleted" } in test02()
114 views::drop(badarg)(x); // { dg-error "deleted" } in test02()
115 (views::take(badarg) | views::all)(x); // { dg-error "deleted" } in test02()
116 (views::drop(badarg) | views::all)(x); // { dg-error "deleted" } in test02()
125 x | std::views::take(S{}); in test03()
126 x | std::views::drop(S{}); in test03()
135 using views::__adaptor::__closure_has_simple_call_op; in test04()
136 static_assert(!__closure_has_simple_call_op<decltype(views::take_while(std::declval<F>()))>); in test04()
137 static_assert(!__closure_has_simple_call_op<decltype(views::drop_while(std::declval<F>()))>); in test04()
138 static_assert(!__closure_has_simple_call_op<decltype(views::filter(std::declval<F>()))>); in test04()
139 static_assert(!__closure_has_simple_call_op<decltype(views::transform(std::declval<F>()))>); in test04()