Go to file
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
cmake Remove triple detection from cmake. 2015-01-16 02:27:17 +00:00
include [libcxx] Make __wrap_iter work with gcc. 2015-01-27 19:27:39 +00:00
lib [cmake/multilib] Teach libc++'s CMake build to support multilib libdir 2014-12-29 12:15:47 +00:00
src Get libc++ building on Sun Solaris. Patch from C Bergstrom. 2015-01-23 22:22:36 +00:00
test [libcxx] Make __wrap_iter work with gcc. 2015-01-27 19:27:39 +00:00
utils/not [libcxx] Allow use of ShTest in libc++ tests along with other changes. 2015-01-22 18:05:58 +00:00
www [libcxx] Allow use of ShTest in libc++ tests along with other changes. 2015-01-22 18:05:58 +00:00
.arcconfig Update Arcanist config to point to reviews.llvm.org 2014-06-10 18:29:36 +00:00
.gitignore [libc++] Refactor test components into modules. 2015-01-09 18:03:29 +00:00
CMakeLists.txt Adopt CMake policy CMP0042. Set MACOSX_RPATH on by default. 2015-01-26 21:56:45 +00:00
CREDITS.TXT Add self to credits 2014-08-21 04:21:43 +00:00
LICENSE.TXT Update the copyright credits -- Happy new year 2014! 2014-01-01 08:27:31 +00:00
Makefile Revert "Fix installheaders target's permissions" 2014-12-16 05:28:07 +00:00