[libcxx-commits] [libcxx] r351993 - Apply D28248: 'Work around GCC PR37804'. Thanks to mdaniels for the patch

Marshall Clow via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 23 15:06:19 PST 2019


Author: marshall
Date: Wed Jan 23 15:06:18 2019
New Revision: 351993

URL: http://llvm.org/viewvc/llvm-project?rev=351993&view=rev
Log:
Apply D28248: 'Work around GCC PR37804'. Thanks to mdaniels for the patch

Added:
    libcxx/trunk/test/std/containers/associative/map/gcc_workaround.pass.cpp
    libcxx/trunk/test/std/containers/associative/set/gcc_workaround.pass.cpp
Modified:
    libcxx/trunk/include/__tree

Modified: libcxx/trunk/include/__tree
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__tree?rev=351993&r1=351992&r2=351993&view=diff
==============================================================================
--- libcxx/trunk/include/__tree (original)
+++ libcxx/trunk/include/__tree Wed Jan 23 15:06:18 2019
@@ -26,6 +26,13 @@ _LIBCPP_PUSH_MACROS
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
+#if defined(__GNUC__) && !defined(__clang__) // gcc.gnu.org/PR37804
+template <class, class, class, class> class _LIBCPP_TEMPLATE_VIS map;
+template <class, class, class, class> class _LIBCPP_TEMPLATE_VIS multimap;
+template <class, class, class> class _LIBCPP_TEMPLATE_VIS set;
+template <class, class, class> class _LIBCPP_TEMPLATE_VIS multiset;
+#endif
+
 template <class _Tp, class _Compare, class _Allocator> class __tree;
 template <class _Tp, class _NodePtr, class _DiffType>
     class _LIBCPP_TEMPLATE_VIS __tree_iterator;

Added: libcxx/trunk/test/std/containers/associative/map/gcc_workaround.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/associative/map/gcc_workaround.pass.cpp?rev=351993&view=auto
==============================================================================
--- libcxx/trunk/test/std/containers/associative/map/gcc_workaround.pass.cpp (added)
+++ libcxx/trunk/test/std/containers/associative/map/gcc_workaround.pass.cpp Wed Jan 23 15:06:18 2019
@@ -0,0 +1,21 @@
+//===----------------------------------------------------------------------===//
+//
+//                     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=37804
+
+#include <map>
+std::map<int,int>::iterator it;
+#include <set>
+using std::set;
+using std::multiset;
+
+int main(void)
+{
+       return 0;
+}

Added: libcxx/trunk/test/std/containers/associative/set/gcc_workaround.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/associative/set/gcc_workaround.pass.cpp?rev=351993&view=auto
==============================================================================
--- libcxx/trunk/test/std/containers/associative/set/gcc_workaround.pass.cpp (added)
+++ libcxx/trunk/test/std/containers/associative/set/gcc_workaround.pass.cpp Wed Jan 23 15:06:18 2019
@@ -0,0 +1,21 @@
+//===----------------------------------------------------------------------===//
+//
+//                     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=37804
+
+#include <set>
+std::set<int> s;
+#include <map>
+using std::map;
+using std::multimap;
+
+int main(void)
+{
+       return 0;
+}




More information about the libcxx-commits mailing list