4 // Copyright (C) 2013 Free Software Foundation, Inc.
6 // This file is part of the GNU ISO C++ Library. This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 3, or (at your option)
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING3. If not see
19 // <http://www.gnu.org/licenses/>.
21 #include <tr1/unordered_map>
22 #include <tr1/unordered_set>
28 placeholder(const T
&s
)
33 template<class T
, class S
>
35 placeholder(const std::pair
<T
,S
> &s
)
42 use(const T
&container
)
44 for (typename
T::const_iterator i
= container
.begin();
53 std::tr1::unordered_map
<int, std::string
> eum
;
54 // { dg-final { note-test eum "std::tr1::unordered_map with 0 elements" } }
55 std::tr1::unordered_multimap
<int, std::string
> eumm
;
56 // { dg-final { note-test eumm "std::tr1::unordered_multimap with 0 elements" } }
57 std::tr1::unordered_set
<int> eus
;
58 // { dg-final { note-test eus "std::tr1::unordered_set with 0 elements" } }
59 std::tr1::unordered_multiset
<int> eums
;
60 // { dg-final { note-test eums "std::tr1::unordered_multiset with 0 elements" } }
62 std::tr1::unordered_map
<int, std::string
> uom
;
65 // { dg-final { note-test uom {std::tr1::unordered_map with 2 elements = {[3] = "seven", [5] = "three"}} } }
67 std::tr1::unordered_multimap
<int, std::string
> uomm
;
68 uomm
.insert(std::pair
<int, std::string
> (5, "three"));
69 uomm
.insert(std::pair
<int, std::string
> (5, "seven"));
70 // { dg-final { note-test uomm {std::tr1::unordered_multimap with 2 elements = {[5] = "three", [5] = "seven"}} } }
72 std::tr1::unordered_set
<int> uos
;
74 // { dg-final { note-test uos {std::tr1::unordered_set with 1 elements = {[0] = 5}} } }
76 std::tr1::unordered_multiset
<int> uoms
;
78 // { dg-final { note-test uoms {std::tr1::unordered_multiset with 1 elements = {[0] = 5}} } }
80 placeholder(""); // Mark SPOT
90 // { dg-final { gdb-test SPOT } }