summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2012-05-15 10:00:19 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2012-05-15 10:00:19 +0000
commit5ac4e73a1dc07f019feee9eceb39f0937ba25b8c (patch)
tree9983ba44c7753e2b84264a4b942386269047c4cb /libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements
parent23adb371935682f1883c9afbff4086d73c8deb97 (diff)
downloadgcc-5ac4e73a1dc07f019feee9eceb39f0937ba25b8c.tar.gz
re PR libstdc++/53339 (unordered_map::iterator requires Value to be complete type)
2012-05-15 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/53339 * include/bits/hashtable_policy.h (__detail::_Identity, __detail::_Select1st): Add. (_Map_base, _Hashtable_base): Use the latter, adjust parameters. * include/bits/hashtable.h (_Hashtable::__key_extract): Adjust. * include/bits/unordered_set.h (__uset_hashtable, __umset_hashtable): Likewise. * include/bits/unordered_map.h (__umap_hashtable, __ummap_hashtable): Likewise. * include/bits/stl_function.h (_Identity, _Select1st, _Select2nd) Unconditionally derive from unary_function. * include/ext/functional (identity, select1st, select2nd): Remove #ifdef __GXX_EXPERIMENTAL_CXX0X__ bits. * testsuite/23_containers/unordered_map/requirements/53339.cc: New. * testsuite/23_containers/unordered_multimap/requirements/ 53339.cc: Likewise. From-SVN: r187515
Diffstat (limited to 'libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements')
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/53339.cc34
1 files changed, 34 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/53339.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/53339.cc
new file mode 100644
index 00000000000..92721333c50
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/53339.cc
@@ -0,0 +1,34 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++11" }
+
+// Copyright (C) 2012 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <unordered_map>
+
+struct LinkedHashMap
+{
+ struct Entry;
+
+ typedef std::unordered_multimap<int, Entry> Storage;
+ typedef Storage::iterator EntryPtr;
+
+ struct Entry
+ {
+ EntryPtr prev, next;
+ };
+};