Enable testing with _LIBCPP_DEBUG and fix bad assertions in string_view.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@229698 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2015-02-18 17:00:31 +00:00
parent 89465dce7c
commit 3f370b0a55
3 changed files with 21 additions and 2 deletions

View File

@@ -313,7 +313,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
void remove_prefix(size_type __n) _NOEXCEPT
{
_LIBCPP_ASSERT(n <= size(), "remove_prefix() can't remove more than size()");
_LIBCPP_ASSERT(__n <= size(), "remove_prefix() can't remove more than size()");
__data += __n;
__size -= __n;
}
@@ -321,7 +321,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
void remove_suffix(size_type __n) _NOEXCEPT
{
_LIBCPP_ASSERT(n <= size(), "remove_suffix() can't remove more than size()");
_LIBCPP_ASSERT(__n <= size(), "remove_suffix() can't remove more than size()");
__size -= __n;
}