Add _LIBCPP_TYPE_VIS_ONLY to forward decl.
http://reviews.llvm.org/D7201
Files:
include/iterator
test/std/iterators/iterators.general/gcc_workaround.pass.cpp
Index: include/iterator
===================================================================
--- include/iterator
+++ include/iterator
@@ -1112,6 +1112,8 @@
>::type
__unwrap_iter(__wrap_iter<_Tp*>);
+template <class _Tp, class _Alloc> class _LIBCPP_TYPE_VIS_ONLY vector;
+
template <class _Iter>
class __wrap_iter
{
Index: test/std/iterators/iterators.general/gcc_workaround.pass.cpp
===================================================================
--- test/std/iterators/iterators.general/gcc_workaround.pass.cpp
+++ 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() {}
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
Index: include/iterator
===================================================================
--- include/iterator
+++ include/iterator
@@ -1112,6 +1112,8 @@
>::type
__unwrap_iter(__wrap_iter<_Tp*>);
+template <class _Tp, class _Alloc> class _LIBCPP_TYPE_VIS_ONLY vector;
+
template <class _Iter>
class __wrap_iter
{
Index: test/std/iterators/iterators.general/gcc_workaround.pass.cpp
===================================================================
--- test/std/iterators/iterators.general/gcc_workaround.pass.cpp
+++ 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() {}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits