]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc
4 // Copyright (C) 2011 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/>.
30 placeholder(const T
&s
)
35 template<class T
, class S
>
37 placeholder(const std::pair
<T
,S
> &s
)
44 use(const T
&container
)
46 for (typename
T::const_iterator i
= container
.begin();
55 std::string str
= "zardoz";
56 // { dg-final { note-test str "\"zardoz\"" } }
62 // { dg-final { note-test bs {std::bitset = {[0] = 1, [5] = 1, [7] = 1}} } }
64 std::deque
<std::string
> deq
;
67 // { dg-final { note-test deq {std::deque with 2 elements = {"one", "two"}} } }
69 std::list
<std::string
> lst
;
72 // { dg-final { note-test lst {std::list = {[0] = "one", [1] = "two"}} } }
74 std::map
<std::string
, int> mp
;
76 // { dg-final { note-test mp {std::map with 1 elements = {["zardoz"] = 23}} } }
78 placeholder(str
); // Mark SPOT
87 // { dg-final { gdb-test SPOT } }