annotate libstdc++-v3/testsuite/24_iterators/insert_iterator/2.cc @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // 2001-06-21 Benjamin Kosnik <bkoz@redhat.com>
kono
parents:
diff changeset
2
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
3 // Copyright (C) 2001-2020 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
4 //
kono
parents:
diff changeset
5 // This file is part of the GNU ISO C++ Library. This library is free
kono
parents:
diff changeset
6 // software; you can redistribute it and/or modify it under the
kono
parents:
diff changeset
7 // terms of the GNU General Public License as published by the
kono
parents:
diff changeset
8 // Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
9 // any later version.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 // This library is distributed in the hope that it will be useful,
kono
parents:
diff changeset
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
kono
parents:
diff changeset
14 // GNU General Public License for more details.
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 // You should have received a copy of the GNU General Public License along
kono
parents:
diff changeset
17 // with this library; see the file COPYING3. If not see
kono
parents:
diff changeset
18 // <http://www.gnu.org/licenses/>.
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 // 24.4.2.5 Template class insert_iterator
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 #include <iterator>
kono
parents:
diff changeset
23 #include <list>
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 void test02()
kono
parents:
diff changeset
26 {
kono
parents:
diff changeset
27 typedef std::insert_iterator<std::list<int> > iterator_type;
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 std::list<int> li;
kono
parents:
diff changeset
30 std::list<int>::iterator liit = li.begin();
kono
parents:
diff changeset
31 iterator_type it01(li, liit);
kono
parents:
diff changeset
32 iterator_type it02 = std::inserter(li, liit);
kono
parents:
diff changeset
33 it01 = it01; // Suppress unused warnings.
kono
parents:
diff changeset
34 it02 = it02;
kono
parents:
diff changeset
35 }
kono
parents:
diff changeset
36
kono
parents:
diff changeset
37 int main()
kono
parents:
diff changeset
38 {
kono
parents:
diff changeset
39 test02();
kono
parents:
diff changeset
40 return 0;
kono
parents:
diff changeset
41 }