diff --git a/include/__tree b/include/__tree index 4144a9599..9f0931ee9 100644 --- a/include/__tree +++ b/include/__tree @@ -26,6 +26,13 @@ _LIBCPP_PUSH_MACROS _LIBCPP_BEGIN_NAMESPACE_STD +#if defined(__GNUC__) && !defined(__clang__) // gcc.gnu.org/PR37804 +template class _LIBCPP_TEMPLATE_VIS map; +template class _LIBCPP_TEMPLATE_VIS multimap; +template class _LIBCPP_TEMPLATE_VIS set; +template class _LIBCPP_TEMPLATE_VIS multiset; +#endif + template class __tree; template class _LIBCPP_TEMPLATE_VIS __tree_iterator; diff --git a/test/std/containers/associative/map/gcc_workaround.pass.cpp b/test/std/containers/associative/map/gcc_workaround.pass.cpp new file mode 100644 index 000000000..622449fac --- /dev/null +++ b/test/std/containers/associative/map/gcc_workaround.pass.cpp @@ -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 +std::map::iterator it; +#include +using std::set; +using std::multiset; + +int main(void) +{ + return 0; +} diff --git a/test/std/containers/associative/set/gcc_workaround.pass.cpp b/test/std/containers/associative/set/gcc_workaround.pass.cpp new file mode 100644 index 000000000..2b923b773 --- /dev/null +++ b/test/std/containers/associative/set/gcc_workaround.pass.cpp @@ -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 +std::set s; +#include +using std::map; +using std::multimap; + +int main(void) +{ + return 0; +}