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::split), std::string_view>); in test01()
42 static_assert(__adaptor_has_simple_extra_args<decltype(views::split), char>); in test01()
43 static_assert(!__adaptor_has_simple_extra_args<decltype(views::split), std::string>); in test01()
47 using views::__adaptor::__closure_has_simple_call_op; in test01()
48 __closure_has_simple_call_op auto a00 = views::all; in test01()
49 __closure_has_simple_call_op auto a01 = views::transform(std::identity{}); in test01()
50 __closure_has_simple_call_op auto a02 = views::filter(std::identity{}); in test01()
51 __closure_has_simple_call_op auto a03 = views::drop(42); in test01()
52 __closure_has_simple_call_op auto a04 = views::take(42); in test01()
53 __closure_has_simple_call_op auto a05 = views::take_while(std::identity{}); in test01()
54 __closure_has_simple_call_op auto a06 = views::drop_while(std::identity{}); in test01()
55 __closure_has_simple_call_op auto a07 = views::join; in test01()
56 __closure_has_simple_call_op auto a08 = views::common; in test01()
57 __closure_has_simple_call_op auto a09 = views::reverse; in test01()
58 __closure_has_simple_call_op auto a10 = views::keys; in test01()
59 __closure_has_simple_call_op auto a11 = views::split(' '); in test01()
66 auto a12 = views::split(s); in test01()
80 views::transform(badarg)(x); // { dg-error "no match" } in test02()
81 views::filter(badarg)(x); // { dg-error "no match" } in test02()
82 views::take_while(badarg)(x); // { dg-error "no match" } in test02()
83 views::drop_while(badarg)(x); // { dg-error "no match" } in test02()
85 (views::transform(badarg) | views::all)(x); // { dg-error "no match" } in test02()
86 (views::filter(badarg) | views::all)(x); // { dg-error "no match" } in test02()
87 (views::take_while(badarg) | views::all)(x); // { dg-error "no match" } in test02()
88 (views::drop_while(badarg) | views::all)(x); // { dg-error "no match" } in test02()
94 views::split(badarg)(x); // { dg-error "deleted function" } in test02()
95 (views::split(badarg) | views::all)(x); // { dg-error "deleted function" } in test02()
96 auto a0 = views::split(badarg); in test02()
98 auto a1 = a0 | views::all; in test02()
101 views::take(badarg)(x); // { dg-error "deleted" } in test02()
102 views::drop(badarg)(x); // { dg-error "deleted" } in test02()
103 (views::take(badarg) | views::all)(x); // { dg-error "deleted" } in test02()
104 (views::drop(badarg) | views::all)(x); // { dg-error "deleted" } in test02()
113 x | std::views::take(S{}); in test03()
114 x | std::views::drop(S{}); in test03()
123 using views::__adaptor::__closure_has_simple_call_op; in test04()
124 static_assert(!__closure_has_simple_call_op<decltype(views::take_while(std::declval<F>()))>); in test04()
125 static_assert(!__closure_has_simple_call_op<decltype(views::drop_while(std::declval<F>()))>); in test04()
126 static_assert(!__closure_has_simple_call_op<decltype(views::filter(std::declval<F>()))>); in test04()
127 static_assert(!__closure_has_simple_call_op<decltype(views::transform(std::declval<F>()))>); in test04()