2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
Fix ConstexprIterator requirements tests - No constexpr algorithms!
* testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
Replace copy with hand-rolled loop.
* testsuite/23_containers/array/requirements/constexpr_iter.cc:
Ditto.
From-SVN: r272159
+2019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
+
+ Fix ConstexprIterator requirements tests - No constexpr algorithms!
+ * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
+ Replace copy with hand-rolled loop.
+ * testsuite/23_containers/array/requirements/constexpr_iter.cc:
+ Ditto.
+
2019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
Test for C++20 p0858 - ConstexprIterator requirements.
static_assert('W' == *(hw.cbegin() + 7));
std::array<int, hw.size()> a2{{0,0,0,0,0,0,0,0,0,0,0,0,0}};
- std::copy(hw.begin(), hw.end(), a2.begin());
+ auto hwi = hw.begin();
+ auto hwe = hw.end();
+ auto a2i = a2.begin();
+ while (hwi != hwe)
+ *a2i++ = *hwi++;
return *(hw.cbegin() + 3);
}
static_assert(1 == *a1.cbegin());
std::array<int, 3> a2{{0, 0, 0}};
- std::copy(a1.begin(), a1.end(), a2.begin());
+ auto a1i = a1.begin();
+ auto a1e = a1.end();
+ auto a2i = a2.begin();
+ while (a1i != a1e)
+ *a2i++ = *a1i++;
return n;
}