Lines Matching full:taref
45 auto taref = MakeTransformArrayRef(input, add1);
46 using TarefIter = decltype(taref)::iterator;
47 using ConstTarefIter = decltype(taref)::const_iterator;
48 static_assert(std::is_same<int, decltype(taref)::value_type>::value, "value_type");
49 static_assert(std::is_same<TarefIter, decltype(taref)::pointer>::value, "pointer");
50 static_assert(std::is_same<int, decltype(taref)::reference>::value, "reference");
51 static_assert(std::is_same<ConstTarefIter, decltype(taref)::const_pointer>::value,
53 static_assert(std::is_same<int, decltype(taref)::const_reference>::value, "const_reference");
55 std::copy(taref.begin(), taref.end(), std::back_inserter(output));
59 std::copy(taref.cbegin(), taref.cend(), std::back_inserter(output));
63 std::copy(taref.rbegin(), taref.rend(), std::back_inserter(output));
67 std::copy(taref.crbegin(), taref.crend(), std::back_inserter(output));
71 ASSERT_EQ(input.size(), taref.size());
72 ASSERT_EQ(input.empty(), taref.empty());
73 ASSERT_EQ(input.front().value + 1, taref.front());
74 ASSERT_EQ(input.back().value + 1, taref.back());
77 ASSERT_EQ(input[i].value + 1, taref[i]);
86 auto taref = MakeTransformArrayRef(input, sub1);
87 using TarefIter = decltype(taref)::iterator;
88 static_assert(std::is_same<void, decltype(taref)::const_iterator>::value, "const_iterator");
89 static_assert(std::is_same<int, decltype(taref)::value_type>::value, "value_type");
90 static_assert(std::is_same<TarefIter, decltype(taref)::pointer>::value, "pointer");
91 static_assert(std::is_same<int, decltype(taref)::reference>::value, "reference");
92 static_assert(std::is_same<void, decltype(taref)::const_pointer>::value, "const_pointer");
93 static_assert(std::is_same<void, decltype(taref)::const_reference>::value, "const_reference");
95 std::copy(taref.begin(), taref.end(), std::back_inserter(output));
99 std::copy(taref.rbegin(), taref.rend(), std::back_inserter(output));
103 ASSERT_EQ(input.size(), taref.size());
104 ASSERT_EQ(input.empty(), taref.empty());
105 ASSERT_EQ(input.front().value - 1, taref.front());
106 ASSERT_EQ(input.back().value - 1, taref.back());
109 ASSERT_EQ(input[i].value - 1, taref[i]);
122 auto taref = MakeTransformArrayRef(input, ref);
123 static_assert(std::is_same<int, decltype(taref)::value_type>::value, "value_type");
124 static_assert(std::is_same<int*, decltype(taref)::pointer>::value, "pointer");
125 static_assert(std::is_same<int&, decltype(taref)::reference>::value, "reference");
126 static_assert(std::is_same<const int*, decltype(taref)::const_pointer>::value, "const_pointer");
127 static_assert(std::is_same<const int&, decltype(taref)::const_reference>::value,
130 std::copy(taref.begin(), taref.end(), std::back_inserter(output));
134 std::copy(taref.cbegin(), taref.cend(), std::back_inserter(output));
138 std::copy(taref.rbegin(), taref.rend(), std::back_inserter(output));
142 std::copy(taref.crbegin(), taref.crend(), std::back_inserter(output));
146 ASSERT_EQ(input.size(), taref.size());
147 ASSERT_EQ(input.empty(), taref.empty());
148 ASSERT_EQ(input.front().value, taref.front());
149 ASSERT_EQ(input.back().value, taref.back());
152 ASSERT_EQ(input[i].value, taref[i]);
158 taref = MakeTransformArrayRef(transformed, ref);
160 taref[i] = transform_input[i];
200 decltype(ctaref) ctaref2 = taref;
201 ASSERT_EQ(taref.size(), ctaref2.size());
202 for (size_t i = 0; i != taref.size(); ++i) {
203 ASSERT_EQ(taref[i], ctaref2[i]);