summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/66055.cc
diff options
context:
space:
mode:
authorNathan Myers <ncm@cantrip.org>2015-05-14 13:47:19 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2015-05-14 14:47:19 +0100
commitddbd742bf84e7ed28d9d37d2c7b4cc9f3d7d05c0 (patch)
treef77775ca0a3b6aab8410c2c329b95d973c454e2b /libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/66055.cc
parentfc8b587d7e3cac469d29a415149102858bf7faf8 (diff)
downloadgcc-ddbd742bf84e7ed28d9d37d2c7b4cc9f3d7d05c0.tar.gz
re PR libstdc++/66055 (hash containers missing required reserving constructors)
2015-05-14 Nathan Myers <ncm@cantrip.org> Jonathan Wakely <jwakely@redhat.com> PR libstdc++/66055 * include/std/unordered_map (unordered_map, unordered_multimap): Add missing constructors. * include/std/unordered_set (unordered_set, unordered_multiset): Likewise. * testsuite/23_containers/unordered_map/cons/66055.cc: New. * testsuite/23_containers/unordered_multimap/cons/66055.cc: New. * testsuite/23_containers/unordered_multiset/cons/66055.cc: New. * testsuite/23_containers/unordered_set/cons/66055.cc: New. Co-Authored-By: Jonathan Wakely <jwakely@redhat.com> From-SVN: r223198
Diffstat (limited to 'libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/66055.cc')
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/66055.cc30
1 files changed, 30 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/66055.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/66055.cc
new file mode 100644
index 00000000000..c4d68ec16da
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/66055.cc
@@ -0,0 +1,30 @@
+// Copyright (C) 2015 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 even 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/>.
+
+// Jonathan Wakely <jwakely@redhat.com>
+
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+#include <unordered_map>
+
+using test_type = std::unordered_multimap<int, int>;
+using hasher_type = test_type::hasher;
+using alloc_type = test_type::allocator_type;
+
+test_type h1(10, alloc_type());
+test_type h2(10, hasher_type(), alloc_type());