cxx/test/std/iterators
Nico Weber a7dcd3a3e1 [libcxx] Make __wrap_iter work with gcc.
he following snippet doesn't build when using gcc and libc++:

    #include <string>
    void f(const std::string& s) { s.begin(); }
    #include <vector>
    void AppendTo(const std::vector<char>& v) { v.begin(); }

The problem is that __wrap_iter has a private constructor. It lists vector<>
and basic_string<> as friends, but gcc seems to ignore this for vector<> for
some reason. Declaring vector before the friend declaration in __wrap_iter is
enough to work around this problem, so do that. With this patch, I'm able to
build chromium/android with libc++. Without it, two translation units fail to
build. (iosfwd already provides a forward declaration of basic_string.)

As far as I can tell, this is due to a gcc bug, which I filed as
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64816.

Fixes PR22355.

http://reviews.llvm.org/D7201


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227226 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 19:27:39 +00:00
..
iterator.container Cleaning up the test suite; remove some includes of non-standard file <__config> 2015-01-18 19:05:51 +00:00
iterator.primitives Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00
iterator.range Cleaning up the test suite; remove some includes of non-standard file <__config> 2015-01-18 19:05:51 +00:00
iterator.requirements Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00
iterator.synopsis Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00
iterators.general [libcxx] Make __wrap_iter work with gcc. 2015-01-27 19:27:39 +00:00
predef.iterators One more #include request in the test suite from Walter Brown 2015-01-11 18:07:06 +00:00
stream.iterators Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00
version.pass.cpp Move test into test/std subdirectory. 2014-12-20 01:40:03 +00:00