History log of /external/libcxx/test/re/re.alg/re.alg.match/awk.pass.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8b00e6c96091c828b40ac410b6f123c7429a653d 02-Aug-2013 Howard Hinnant <hhinnant@apple.com> Ok, 3 major changes for debug mode in one commit:

1. I had been detecting and trapping iterator == and \!= among iterators
in different containers as an error. But the trapping itself is actually
an error.

Consider:

#include <iostream>
#include <vector>
#include <algorithm>

template <class C>
void
display(const C& c)
{
std::cout << "{";
bool first = true;
for (const auto& x : c)
{
if (\!first)
std::cout << ", ";
first = false;
std::cout << x;
}
std::cout << "}\n";
}

int
main()
{
typedef std::vector<int> V;
V v1 = {1, 3, 5};
V v2 = {2, 4, 6};
display(v1);
display(v2);
V::iterator i = std::find(v1.begin(), v1.end(), 1);
V::iterator j = std::find(v2.begin(), v2.end(), 2);
if (*i == *j)
i = j; // perfectly legal
// ...
if (i \!= j) // the only way to check
v2.push_back(*i);
display(v1);
display(v2);
}

It is legal to assign an iterator from one container to another of the
same type. This is required to work. One might want to test whether or
not such an assignment had been made. The way one performs such a check
is using the iterator's ==, \!= operator. This is a logical and necessary
function and does not constitute an error.

2. I had a header circular dependence bug when _LIBCPP_DEBUG2 is defined.
This caused a problem in several of the libc++ tests.
Fixed.

3. There is a serious problem when _LIBCPP_DEBUG2=1 at the moment in that
std::basic_string is inoperable. std::basic_string uses __wrap_iterator
to implement its iterators. __wrap_iterator has been rigged up in debug
mode to support vector. But string hasn't been rigged up yet. This means
that one gets false positives when using std::string in debug mode. I've
upped std::string's priority in www/debug_mode.html.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/re/re.alg/re.alg.match/awk.pass.cpp
83e2c4d877fe2d7793868b1c6a5d9525a7c4d431 05-Jan-2013 Marshall Clow <mclow@qualcomm.com> Move common header files into a 'support' directory; make 'testit' include -I to that directory; rename 'iterators.h' to 'iterator_test.h'; remove hard-coded paths to include files from more than 350 source files

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/re/re.alg/re.alg.match/awk.pass.cpp
ba1920fe4b98e61fe47b432689c98b999f5139e3 03-Jan-2013 Marshall Clow <mclow@qualcomm.com> Removed several more different 'iterators.h' files in libcxx/test

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/re/re.alg/re.alg.match/awk.pass.cpp
b64f8b07c104c6cc986570ac8ee0ed16a9f23976 16-Nov-2010 Howard Hinnant <hhinnant@apple.com> license change

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/re/re.alg/re.alg.match/awk.pass.cpp
aa78f9cdb3c8a049660deb39c9296501d2467d78 14-Aug-2010 Howard Hinnant <hhinnant@apple.com> [re.alg.match]

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@111075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/re/re.alg/re.alg.match/awk.pass.cpp