Apply D28248: 'Work around GCC PR37804'. Thanks to mdaniels for the patch

llvm-svn: 351993
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 28166dd9b385861fb5bbadd7186cca16fc6a5174
diff --git a/include/__tree b/include/__tree
index 4144a95..9f0931e 100644
--- a/include/__tree
+++ b/include/__tree
@@ -26,6 +26,13 @@
 
 _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;