diff options
author | Nico Weber <nicolasweber@gmx.de> | 2015-02-02 17:19:47 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2015-02-02 17:34:41 +0800 |
commit | 4c954d6a1cfb0706c9c810d02dfcb8f1a61fc89b (patch) | |
tree | a73ed921ca153586ea124832ed008ee53a100552 | |
parent | d40a4ce7579eeda6e77620a2ad67b113a396ab4b (diff) | |
download | ndk-4c954d6a1cfb0706c9c810d02dfcb8f1a61fc89b.tar.gz |
Workaround __wrap_iter for GCC
Cherry-pick libcxx trunk@227226.
See http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150126/122194.html
Change-Id: I7d515fadb89db0fc539d8ea4a1b7f7c0aa68c617
-rw-r--r-- | sources/cxx-stl/llvm-libc++/libcxx/include/iterator | 2 | ||||
-rw-r--r-- | sources/cxx-stl/llvm-libc++/libcxx/test/std/iterators/iterators.general/gcc_workaround.pass.cpp | 20 |
2 files changed, 22 insertions, 0 deletions
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/iterator b/sources/cxx-stl/llvm-libc++/libcxx/include/iterator index f338e018d..f27253413 100644 --- a/sources/cxx-stl/llvm-libc++/libcxx/include/iterator +++ b/sources/cxx-stl/llvm-libc++/libcxx/include/iterator @@ -1105,6 +1105,8 @@ typename enable_if >::type __unwrap_iter(__wrap_iter<_Tp*>); +template <class _Tp, class _Alloc> class _LIBCPP_TYPE_VIS_ONLY vector; + template <class _Iter> class __wrap_iter { diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/std/iterators/iterators.general/gcc_workaround.pass.cpp b/sources/cxx-stl/llvm-libc++/libcxx/test/std/iterators/iterators.general/gcc_workaround.pass.cpp new file mode 100644 index 000000000..6522bd3c7 --- /dev/null +++ b/sources/cxx-stl/llvm-libc++/libcxx/test/std/iterators/iterators.general/gcc_workaround.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// Tests workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64816. + +#include <string> + +void f(const std::string &s) { s.begin(); } + +#include <vector> + +void AppendTo(const std::vector<char> &v) { v.begin(); } + +int main() {} |