Index: include/__tree =================================================================== --- include/__tree +++ include/__tree @@ -23,6 +23,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if defined(__GNUC__) && !defined(__clang__) // gcc.gnu.org/PR37804 +template class _LIBCPP_TYPE_VIS_ONLY map; +template class _LIBCPP_TYPE_VIS_ONLY multimap; +template class _LIBCPP_TYPE_VIS_ONLY set; +template class _LIBCPP_TYPE_VIS_ONLY multiset; +#endif + template class __tree; template class _LIBCPP_TYPE_VIS_ONLY __tree_iterator; Index: test/std/containers/associative/map/gcc_workaround.pass.cpp =================================================================== --- test/std/containers/associative/map/gcc_workaround.pass.cpp +++ 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; +} Index: test/std/containers/associative/set/gcc_workaround.pass.cpp =================================================================== --- test/std/containers/associative/set/gcc_workaround.pass.cpp +++ 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; +}