]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/libstdc++-prettyprinters/80276.cc
1 // { dg-do run { target c++11 } }
2 // { dg-options "-g -O0" }
4 // Copyright (C) 2018-2019 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 // Type printers only recognize the old std::string for now.
22 #define _GLIBCXX_USE_CXX11_ABI 0
33 placeholder(const T
*s
)
35 std::cout
<< (void *) s
;
42 unique_ptr
<vector
<unique_ptr
<vector
<int>*>>> p1
;
43 unique_ptr
<vector
<unique_ptr
<set
<int>*>>[]> p2
;
44 unique_ptr
<set
<unique_ptr
<vector
<int>*>>[10]> p3
;
45 unique_ptr
<vector
<unique_ptr
<list
<std::string
>[]>>[99]> p4
;
46 // { dg-final { whatis-regexp-test p1 "std::unique_ptr<std::(__debug::)?vector<std::unique_ptr<std::(__debug::)?vector<int>\\*>>>" } }
47 // { dg-final { whatis-regexp-test p2 "std::unique_ptr<std::(__debug::)?vector<std::unique_ptr<std::(__debug::)?set<int>\\*>>\\\[\\\]>" } }
48 // { dg-final { whatis-regexp-test p3 "std::unique_ptr<std::(__debug::)?set<std::unique_ptr<std::(__debug::)?vector<int>\\*>>\\\[10\\\]>" } }
49 // { dg-final { whatis-regexp-test p4 "std::unique_ptr<std::(__debug::)?vector<std::unique_ptr<std::(__debug::)?list<std::string>\\\[\\\]>>\\\[99\\\]>" } }
51 placeholder(&p1
); // Mark SPOT
60 // { dg-final { gdb-test SPOT } }