mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-22 16:37:40 +08:00
Apply D28248: 'Work around GCC PR37804'. Thanks to mdaniels for the patch
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@351993 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -26,6 +26,13 @@ _LIBCPP_PUSH_MACROS
|
|||||||
|
|
||||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
_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 _Compare, class _Allocator> class __tree;
|
||||||
template <class _Tp, class _NodePtr, class _DiffType>
|
template <class _Tp, class _NodePtr, class _DiffType>
|
||||||
class _LIBCPP_TEMPLATE_VIS __tree_iterator;
|
class _LIBCPP_TEMPLATE_VIS __tree_iterator;
|
||||||
|
21
test/std/containers/associative/map/gcc_workaround.pass.cpp
Normal file
21
test/std/containers/associative/map/gcc_workaround.pass.cpp
Normal file
@@ -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;
|
||||||
|
}
|
21
test/std/containers/associative/set/gcc_workaround.pass.cpp
Normal file
21
test/std/containers/associative/set/gcc_workaround.pass.cpp
Normal file
@@ -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;
|
||||||
|
}
|
Reference in New Issue
Block a user