Another installment on debug mode. This addresses list. However this should be considered a temporary state. The API of the debug database and how vector and list use it, is unsatisfactory at the moment. It is both inefficient and overly verbose. I wanted to get this functionality checked in though. In the next day or so I'll refactor what is there in an attempt to streamline things.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140660 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -58,6 +58,8 @@ int main()
|
||||
assert(c2.empty());
|
||||
assert(distance(c2.begin(), c2.end()) == 0);
|
||||
}
|
||||
#ifndef _LIBCPP_DEBUG_LEVEL
|
||||
// This test known to result in undefined behavior detected by _LIBCPP_DEBUG_LEVEL >= 1
|
||||
{
|
||||
int a1[] = {1, 3, 7, 9, 10};
|
||||
int a2[] = {0, 2, 4, 5, 6, 8, 11};
|
||||
@@ -70,6 +72,7 @@ int main()
|
||||
assert((c2 == std::list<int, A>(a1, a1+sizeof(a1)/sizeof(a1[0]))));
|
||||
assert(c2.get_allocator() == A(2));
|
||||
}
|
||||
#endif
|
||||
{
|
||||
int a1[] = {1, 3, 7, 9, 10};
|
||||
int a2[] = {0, 2, 4, 5, 6, 8, 11};
|
||||
|
Reference in New Issue
Block a user