annotate libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-2.cc @ 155:da32f4b04d38

fix __code name conflict
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 17:51:46 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 //
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
2 // Copyright (C) 2004-2020 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3 //
kono
parents:
diff changeset
4 // This file is part of the GNU ISO C++ Library. This library is free
kono
parents:
diff changeset
5 // software; you can redistribute it and/or modify it under the
kono
parents:
diff changeset
6 // terms of the GNU General Public License as published by the
kono
parents:
diff changeset
7 // Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
8 // any later version.
kono
parents:
diff changeset
9 //
kono
parents:
diff changeset
10 // This library is distributed in the hope that it will be useful,
kono
parents:
diff changeset
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
kono
parents:
diff changeset
13 // GNU General Public License for more details.
kono
parents:
diff changeset
14 //
kono
parents:
diff changeset
15 // You should have received a copy of the GNU General Public License along
kono
parents:
diff changeset
16 // with this library; see the file COPYING3. If not see
kono
parents:
diff changeset
17 // <http://www.gnu.org/licenses/>.
kono
parents:
diff changeset
18
kono
parents:
diff changeset
19 // 20.4.1.1 allocator members
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 #include <string>
kono
parents:
diff changeset
22 #include <stdexcept>
kono
parents:
diff changeset
23 #include <cstdio>
kono
parents:
diff changeset
24 #include <ext/mt_allocator.h>
kono
parents:
diff changeset
25 #include <replacement_memory_operators.h>
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 typedef char value_type;
kono
parents:
diff changeset
28 typedef std::char_traits<value_type> traits_type;
kono
parents:
diff changeset
29 using __gnu_cxx::__pool;
kono
parents:
diff changeset
30 typedef __gnu_cxx::__common_pool_policy<__pool, false> policy_type;
kono
parents:
diff changeset
31 typedef __gnu_cxx::__mt_alloc<value_type, policy_type> allocator_type;
kono
parents:
diff changeset
32 typedef std::basic_string<value_type, traits_type, allocator_type> string_type;
kono
parents:
diff changeset
33
kono
parents:
diff changeset
34 int main()
kono
parents:
diff changeset
35 {
kono
parents:
diff changeset
36 // NB: __mt_allocator doesn't clean itself up. Thus, the count will
kono
parents:
diff changeset
37 // not be zero.
kono
parents:
diff changeset
38 __gnu_test::counter::exceptions(false);
kono
parents:
diff changeset
39 string_type s;
kono
parents:
diff changeset
40 s += "bayou bend";
kono
parents:
diff changeset
41 return 0;
kono
parents:
diff changeset
42 }