Revert "Merge to upstream r304942."

This reverts commit 83b1388ecd, reversing
changes made to f20819f925.

Test: treehugger
Bug: None
This commit is contained in:
Dan Albert
2018-01-11 10:41:39 -08:00
parent ef7d5b4347
commit 38a0d5af7e
1110 changed files with 15077 additions and 19371 deletions

View File

@@ -27,17 +27,16 @@
template <class S, class SV>
void
test(SV sv, std::size_t pos, std::size_t n)
test(SV sv, unsigned pos, unsigned n)
{
typedef typename S::traits_type T;
typedef typename S::allocator_type A;
typedef typename S::size_type Size;
if (pos <= sv.size())
{
S s2(sv, static_cast<Size>(pos), static_cast<Size>(n));
S s2(sv, pos, n);
LIBCPP_ASSERT(s2.__invariants());
assert(pos <= sv.size());
std::size_t rlen = std::min(sv.size() - pos, n);
unsigned rlen = std::min<unsigned>(sv.size() - pos, n);
assert(s2.size() == rlen);
assert(T::compare(s2.data(), sv.data() + pos, rlen) == 0);
assert(s2.get_allocator() == A());
@@ -48,7 +47,7 @@ test(SV sv, std::size_t pos, std::size_t n)
{
try
{
S s2(sv, static_cast<Size>(pos), static_cast<Size>(n));
S s2(sv, pos, n);
assert(false);
}
catch (std::out_of_range&)
@@ -61,16 +60,16 @@ test(SV sv, std::size_t pos, std::size_t n)
template <class S, class SV>
void
test(SV sv, std::size_t pos, std::size_t n, const typename S::allocator_type& a)
test(SV sv, unsigned pos, unsigned n, const typename S::allocator_type& a)
{
typedef typename S::traits_type T;
typedef typename S::size_type Size;
typedef typename S::allocator_type A;
if (pos <= sv.size())
{
S s2(sv, static_cast<Size>(pos), static_cast<Size>(n), a);
S s2(sv, pos, n, a);
LIBCPP_ASSERT(s2.__invariants());
assert(pos <= sv.size());
std::size_t rlen = std::min(sv.size() - pos, n);
unsigned rlen = std::min<unsigned>(sv.size() - pos, n);
assert(s2.size() == rlen);
assert(T::compare(s2.data(), sv.data() + pos, rlen) == 0);
assert(s2.get_allocator() == a);
@@ -81,7 +80,7 @@ test(SV sv, std::size_t pos, std::size_t n, const typename S::allocator_type& a)
{
try
{
S s2(sv, static_cast<Size>(pos), static_cast<Size>(n), a);
S s2(sv, pos, n, a);
assert(false);
}
catch (std::out_of_range&)