Home
last modified time | relevance | path

Searched refs:as_const (Results 1 – 25 of 50) sorted by relevance

12

/llvm-project-15.0.7/libcxx/test/std/ranges/range.adaptors/range.zip/
H A Dend.pass.cpp77 static_assert(std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>); in test()
84 static_assert(std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>); in test()
91 static_assert(std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>); in test()
98 static_assert(std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>); in test()
105 static_assert(std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>); in test()
112 static_assert(std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>); in test()
119 static_assert(std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>); in test()
126 static_assert(std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>); in test()
133 static_assert(std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>); in test()
140 static_assert(std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>); in test()
[all …]
H A Dsize.pass.cpp54 assert(std::as_const(v).size() == 8); in test()
61 assert(std::as_const(v).size() == 2); in test()
68 assert(std::as_const(v).size() == 3); in test()
76 static_assert(!std::ranges::sized_range<decltype(std::as_const(v))>); in test()
83 assert(std::as_const(v).size() == 6); in test()
90 static_assert(!std::ranges::sized_range<decltype(std::as_const(v))>); in test()
H A Dbegin.pass.cpp67 static_assert(std::is_same_v<decltype(v.begin()), decltype(std::as_const(v).begin())>); in test()
68 assert(v.begin() == std::as_const(v).begin()); in test()
69 auto [x, y] = *std::as_const(v).begin(); in test()
82 static_assert(!std::is_same_v<decltype(v.begin()), decltype(std::as_const(v).begin())>); in test()
83 assert(v.begin() == std::as_const(v).begin()); in test()
84 auto [x, y] = *std::as_const(v).begin(); in test()
/llvm-project-15.0.7/libcxx/test/std/utilities/utility/as_const/
H A Das_const.pass.cpp26 …static_assert(std::is_const<typename std::remove_reference<decltype(std::as_const in test()
27 …static_assert(std::is_const<typename std::remove_reference<decltype(std::as_const< T… in test()
28 …static_assert(std::is_const<typename std::remove_reference<decltype(std::as_const<const T… in test()
29 …static_assert(std::is_const<typename std::remove_reference<decltype(std::as_const<volatile T… in test()
30 …static_assert(std::is_const<typename std::remove_reference<decltype(std::as_const<const volatile T… in test()
32 assert(std::as_const(t) == t); in test()
33 assert(std::as_const< T>(t) == t); in test()
34 assert(std::as_const<const T>(t) == t); in test()
35 assert(std::as_const<volatile T>(t) == t); in test()
36 assert(std::as_const<const volatile T>(t) == t); in test()
/llvm-project-15.0.7/libcxx/test/std/ranges/range.adaptors/range.join.view/
H A Dend.pass.cpp61 assert(std::as_const(jv).end() == std::ranges::next(std::as_const(jv).begin(), 16)); in test()
64 static_assert(std::same_as<decltype(jv.end()), decltype(std::as_const(jv).end())>); in test()
76 assert(std::as_const(jv).end() == std::ranges::next(std::as_const(jv).begin(), 12)); in test()
91 assert(std::as_const(jv).end() == std::ranges::next(std::as_const(jv).begin(), 12)); in test()
119 assert(std::as_const(jv).end() == std::ranges::next(std::as_const(jv).begin(), 16)); in test()
134 assert(std::as_const(jv).end() == std::ranges::next(std::as_const(jv).begin(), 16)); in test()
149 assert(std::as_const(jv).end() == std::ranges::next(std::as_const(jv).begin(), 4)); in test()
164 assert(std::as_const(jv).end() == std::ranges::next(std::as_const(jv).begin(), 12)); in test()
179 assert(std::as_const(jv).end() == std::ranges::next(std::as_const(jv).begin(), 12)); in test()
207 assert(std::as_const(jv).end() == std::ranges::next(std::as_const(jv).begin(), 16)); in test()
[all …]
/llvm-project-15.0.7/libcxx/test/libcxx/ranges/range.access/
H A Dend.incomplete_type.pass.cpp27 assert((!std::is_invocable_v<decltype(std::ranges::end), decltype(std::as_const(bounded))>)); in test()
28 assert((!std::is_invocable_v<decltype(std::ranges::cend), decltype(std::as_const(bounded))>)); in test()
34 assert((!std::is_invocable_v<decltype(std::ranges::end), decltype(std::as_const(unbounded))>)); in test()
35 assert((!std::is_invocable_v<decltype(std::ranges::cend), decltype(std::as_const(unbounded))>)); in test()
/llvm-project-15.0.7/clang/test/SemaCXX/
H A Dbuiltin-std-move.cpp46 template<typename T> CONSTEXPR const T &as_const(T &x) { in as_const() function
70 const A &as_const = std::as_const(a); in f() local
75 &as_const == &a && addressof == &a && in f()
95 const B &(*pAsConst)(B&) = &std::as_const; // #4 expected-note {{instantiation of}}
132 std::as_const(n); // expected-warning {{ignoring return value}} in attribute_const()
/llvm-project-15.0.7/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/
H A Dbegin_end.pass.cpp102 assert(std::as_const(ov).begin() == a); in test()
104 assert(std::as_const(ov).end() == a); in test()
111 assert(std::as_const(ov).begin() == a); in test()
113 assert(std::as_const(ov).end() == a+1); in test()
120 assert(std::to_address(std::as_const(ov).begin()) != std::to_address(a.begin())); in test()
122 assert(std::to_address(std::as_const(ov).end()) != std::to_address(a.end())); in test()
H A Dsize.pass.cpp74 assert(std::as_const(ov).size() == 0); in test()
81 assert(std::as_const(ov).size() == 1); in test()
88 assert(std::as_const(ov).size() == 2); in test()
H A Dempty.pass.cpp80 assert(std::as_const(ov).empty()); in test()
87 assert(!std::as_const(ov).empty()); in test()
94 assert(!std::as_const(ov).empty()); in test()
H A Ddata.pass.cpp60 assert(std::as_const(ov).data() == a); in test()
67 assert(std::as_const(ov).data() != a.data()); in test()
/llvm-project-15.0.7/libcxx/test/std/ranges/range.utility/range.subrange/
H A Dstructured_bindings.pass.cpp36 auto [first, last] = std::as_const(r); in test_sized_subrange()
41 auto [first, last] = std::move(std::as_const(r)); in test_sized_subrange()
63 auto [first, last] = std::as_const(r); in test_unsized_subrange()
68 auto [first, last] = std::move(std::as_const(r)); in test_unsized_subrange()
/llvm-project-15.0.7/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/
H A Deq.pass.cpp68 static_assert(!EqualityComparable<decltype(std::as_const(jv).begin()), decltype(jv.end())>); in test()
69 static_assert(!EqualityComparable<decltype(jv.begin()), decltype(std::as_const(jv).end())>); in test()
85 assert(std::as_const(jv).end() == std::ranges::next(jv.begin(), 8)); in test()
86 assert(jv.end() == std::ranges::next(std::as_const(jv).begin(), 8)); in test()
H A Dctor.other.pass.cpp59 assert(std::as_const(jv).begin() != sent2); in test()
60 assert(std::ranges::next(std::as_const(jv).begin(), 12) == sent2); in test()
/llvm-project-15.0.7/libcxx/test/std/ranges/range.adaptors/range.counted/
H A Dcounted.pass.cpp64 auto c2 = std::views::counted(std::as_const(buffer), 3); in test()
78 auto c2 = std::views::counted(std::as_const(it), 3); in test()
82 auto c6 = std::views::counted(std::as_const(cit), 3); in test()
110 auto c2 = std::views::counted(std::as_const(it), 3); in test()
114 auto c6 = std::views::counted(std::as_const(cit), 3); in test()
142 auto c2 = std::views::counted(std::as_const(it), 3); in test()
146 auto c6 = std::views::counted(std::as_const(cit), 3); in test()
176 auto c2 = std::views::counted(std::as_const(it), 3); in test()
197 auto c2 = std::views::counted(std::as_const(it), 3); in test()
/llvm-project-15.0.7/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/
H A Deq.pass.cpp33 assert(jv.begin() == std::as_const(jv).begin()); in test()
54 auto const_iter = std::as_const(jv).begin(); in test()
65 auto const_iter = std::as_const(jv).begin(); in test()
H A Dctor.other.pass.cpp43 using const_iterator = decltype(std::as_const(jv).begin()); in test()
58 using const_iterator = decltype(std::as_const(jv).begin()); in test()
71 using const_iterator = decltype(std::as_const(jv).begin()); in test()
/llvm-project-15.0.7/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/
H A Deq.pass.cpp90 assert(v.begin() + 4 == std::as_const(v).end()); in test()
113 assert(std::as_const(v).begin() + 4 == v.end()); in test()
114 assert(std::as_const(v).begin() + 4 == std::as_const(v).end()); in test()
115 assert(v.begin() + 4 == std::as_const(v).end()); in test()
H A Dminus.pass.cpp177 auto const_it = std::as_const(v).begin(); in test()
179 auto const_st = std::as_const(v).end(); in test()
214 auto const_it = std::as_const(v).begin(); in test()
216 auto const_st = std::as_const(v).end(); in test()
H A Dctor.other.pass.cpp62 assert(std::as_const(v).begin() != sent2); in test()
64 assert(std::as_const(v).begin() + 4 == sent2); in test()
/llvm-project-15.0.7/libcxx/include/__utility/
H A Das_const.h25 _LIBCPP_NODISCARD_EXT constexpr add_const_t<_Tp>& as_const(_Tp& __t) noexcept { return __t; } in as_const() function
28 void as_const(const _Tp&&) = delete;
/llvm-project-15.0.7/clang/test/CodeGenCXX/
H A Dbuiltin-std-move.cpp7 template<typename T> constexpr const T &as_const(T &val);
42 take_lval(std::as_const<T&&>(t)); in test()
/llvm-project-15.0.7/libcxx/test/std/ranges/range.adaptors/range.take/sentinel/
H A Dctor.pass.cpp48 assert(std::as_const(tv).begin() + 4 == s); in test()
49 assert(std::as_const(tv).begin() + 4 == cs); in test()
/llvm-project-15.0.7/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.swap/
H A Dmember_swap_const.pass.cpp44 std::swap(std::as_const(t1), std::as_const(t2)); in test_noexcept()
/llvm-project-15.0.7/libcxx/test/std/ranges/range.adaptors/range.drop/
H A Dbegin.pass.cpp95 assert(std::as_const(dropView).begin() == nullptr); in test()
110 assert(std::as_const(dropView).begin() == nullptr); in test()

12