gccxml_gem 0.9-x86-cygwin
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +75 -0
- data/bin/gccxml.exe +0 -0
- data/bin/gccxml_cc1plus.exe +0 -0
- data/gccxml.rb +50 -0
- data/share/doc/gccxml-0.9/Copyright.txt +55 -0
- data/share/doc/gccxml-0.9/gccxml.html +168 -0
- data/share/doc/gccxml-0.9/gccxml.txt +293 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/algorithm +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/algorithm.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/bitset +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/bitset.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/cctype +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/cfloat +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/climits +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/cmath +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/complex +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/complex.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/cstddef +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/cstdio +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/cstdlib +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/cstring +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/cstring.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/ctime +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/cwchar +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/cwctype +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/deque +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/deque.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/exception +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/exception.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/fstream +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/fstream.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/function +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/function.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/functional +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/gccxml_typeinfo.h +146 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/iomanip +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/iomanip.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/ios +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/ios.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/iosfwd +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/iosfwd.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/iostream +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/iostream.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/istream +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/istream.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/iterator +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/iterator.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/limits +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/limits.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/list +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/list.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/locale +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/locale.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/map +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/map.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/memory +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/memory.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/new +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/new.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/numeric +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/numeric.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/ostream +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/ostream.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/queue +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/queue.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/codecvt +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/collate +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/ctype +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/iosbase +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/iotraits +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/iterator +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/lochelp +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/locimpl +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/locvector +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/messages +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/money +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/numbrw +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/numeral +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/rwdispatch.h +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/rwlocale +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/rwstderr_macros.h +64 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/string_ref +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/time +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/traits +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/tree +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/usefacet +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/valimp +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/rw/vendor +1 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/set +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/set.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/sstream +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/sstream.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/stack +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/stack.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/stdexcept +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/stdexcept.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/streambuf +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/streambuf.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/string +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/string.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/strstream +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/strstream.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/typeinfo +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/typeinfo.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/utility +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/utility.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/valarray +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/valarray.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/vector +7 -0
- data/share/gccxml-0.9/Borland/5.5/Wrappers/vector.h +7 -0
- data/share/gccxml-0.9/Borland/5.5/except.h +154 -0
- data/share/gccxml-0.9/Borland/5.5/gccxml_fstream.h +431 -0
- data/share/gccxml-0.9/Borland/5.5/gccxml_new.h +166 -0
- data/share/gccxml-0.9/Borland/5.5/gccxml_valarray.h +786 -0
- data/share/gccxml-0.9/Borland/5.5/gccxml_vector.h +1457 -0
- data/share/gccxml-0.9/Borland/5.5/io.h +352 -0
- data/share/gccxml-0.9/Borland/5.5/oaidl.h +7006 -0
- data/share/gccxml-0.9/Borland/5.5/propidl.h +1477 -0
- data/share/gccxml-0.9/Borland/5.5/rw/locimpl.h +477 -0
- data/share/gccxml-0.9/Borland/5.5/rw/rwlocale.h +619 -0
- data/share/gccxml-0.9/Borland/5.5/stdarg.h +55 -0
- data/share/gccxml-0.9/Borland/5.5/valarray.cc +2883 -0
- data/share/gccxml-0.9/GCC/2.95/algorithm +76 -0
- data/share/gccxml-0.9/GCC/2.95/bitset +17 -0
- data/share/gccxml-0.9/GCC/2.95/cctype +24 -0
- data/share/gccxml-0.9/GCC/2.95/clocale +14 -0
- data/share/gccxml-0.9/GCC/2.95/cmath +33 -0
- data/share/gccxml-0.9/GCC/2.95/complex +38 -0
- data/share/gccxml-0.9/GCC/2.95/csetjmp +13 -0
- data/share/gccxml-0.9/GCC/2.95/csignal +14 -0
- data/share/gccxml-0.9/GCC/2.95/cstdarg +12 -0
- data/share/gccxml-0.9/GCC/2.95/cstddef +13 -0
- data/share/gccxml-0.9/GCC/2.95/cstdio +55 -0
- data/share/gccxml-0.9/GCC/2.95/cstdlib +66 -0
- data/share/gccxml-0.9/GCC/2.95/cstring +34 -0
- data/share/gccxml-0.9/GCC/2.95/ctime +24 -0
- data/share/gccxml-0.9/GCC/2.95/cwchar +65 -0
- data/share/gccxml-0.9/GCC/2.95/cwctype +31 -0
- data/share/gccxml-0.9/GCC/2.95/deque +19 -0
- data/share/gccxml-0.9/GCC/2.95/exception +20 -0
- data/share/gccxml-0.9/GCC/2.95/fstream +23 -0
- data/share/gccxml-0.9/GCC/2.95/functional +64 -0
- data/share/gccxml-0.9/GCC/2.95/gccxml_bitset +1066 -0
- data/share/gccxml-0.9/GCC/2.95/iomanip +20 -0
- data/share/gccxml-0.9/GCC/2.95/iosfwd +20 -0
- data/share/gccxml-0.9/GCC/2.95/iostream +27 -0
- data/share/gccxml-0.9/GCC/2.95/iterator +39 -0
- data/share/gccxml-0.9/GCC/2.95/list +19 -0
- data/share/gccxml-0.9/GCC/2.95/map +20 -0
- data/share/gccxml-0.9/GCC/2.95/memory +21 -0
- data/share/gccxml-0.9/GCC/2.95/new +13 -0
- data/share/gccxml-0.9/GCC/2.95/numeric +15 -0
- data/share/gccxml-0.9/GCC/2.95/pthread.h +16 -0
- data/share/gccxml-0.9/GCC/2.95/queue +20 -0
- data/share/gccxml-0.9/GCC/2.95/set +20 -0
- data/share/gccxml-0.9/GCC/2.95/sstream +24 -0
- data/share/gccxml-0.9/GCC/2.95/stack +19 -0
- data/share/gccxml-0.9/GCC/2.95/std/bastring.cc +524 -0
- data/share/gccxml-0.9/GCC/2.95/std/complext.h +397 -0
- data/share/gccxml-0.9/GCC/2.95/std/dcomplex.h +92 -0
- data/share/gccxml-0.9/GCC/2.95/std/fcomplex.h +88 -0
- data/share/gccxml-0.9/GCC/2.95/std/gslice_array.h +170 -0
- data/share/gccxml-0.9/GCC/2.95/std/indirect_array.h +157 -0
- data/share/gccxml-0.9/GCC/2.95/std/ldcomplex.h +96 -0
- data/share/gccxml-0.9/GCC/2.95/std/mask_array.h +154 -0
- data/share/gccxml-0.9/GCC/2.95/std/slice_array.h +156 -0
- data/share/gccxml-0.9/GCC/2.95/std/std_valarray.h +728 -0
- data/share/gccxml-0.9/GCC/2.95/std/straits.h +162 -0
- data/share/gccxml-0.9/GCC/2.95/std/valarray_meta.h +1035 -0
- data/share/gccxml-0.9/GCC/2.95/stdexcept +17 -0
- data/share/gccxml-0.9/GCC/2.95/stl_alloc.h +1057 -0
- data/share/gccxml-0.9/GCC/2.95/stl_bvector.h +836 -0
- data/share/gccxml-0.9/GCC/2.95/stl_deque.h +1699 -0
- data/share/gccxml-0.9/GCC/2.95/stl_list.h +843 -0
- data/share/gccxml-0.9/GCC/2.95/stl_tree.h +1331 -0
- data/share/gccxml-0.9/GCC/2.95/stl_vector.h +828 -0
- data/share/gccxml-0.9/GCC/2.95/string +26 -0
- data/share/gccxml-0.9/GCC/2.95/strstream +23 -0
- data/share/gccxml-0.9/GCC/2.95/typeinfo +11 -0
- data/share/gccxml-0.9/GCC/2.95/utility +25 -0
- data/share/gccxml-0.9/GCC/2.95/valarray +52 -0
- data/share/gccxml-0.9/GCC/2.95/vector +19 -0
- data/share/gccxml-0.9/GCC/2.96/sstream +305 -0
- data/share/gccxml-0.9/GCC/3.0/pthread.h +16 -0
- data/share/gccxml-0.9/GCC/3.1/pthread.h +16 -0
- data/share/gccxml-0.9/GCC/3.2/bits/fstream.tcc +500 -0
- data/share/gccxml-0.9/GCC/3.2/bits/istream.tcc +1207 -0
- data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.h +1810 -0
- data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.tcc +2397 -0
- data/share/gccxml-0.9/GCC/3.2/bits/messages_members.h +108 -0
- data/share/gccxml-0.9/GCC/3.2/bits/ostream.tcc +713 -0
- data/share/gccxml-0.9/GCC/3.2/bits/sstream.tcc +241 -0
- data/share/gccxml-0.9/GCC/3.2/bits/stl_deque.h +1682 -0
- data/share/gccxml-0.9/GCC/3.2/bits/stl_list.h +989 -0
- data/share/gccxml-0.9/GCC/3.2/bits/stl_tree.h +1462 -0
- data/share/gccxml-0.9/GCC/3.2/bits/stl_vector.h +1085 -0
- data/share/gccxml-0.9/GCC/3.2/bits/valarray_meta.h +1063 -0
- data/share/gccxml-0.9/GCC/3.2/fstream +579 -0
- data/share/gccxml-0.9/GCC/3.2/pthread.h +16 -0
- data/share/gccxml-0.9/GCC/3.2/sstream +384 -0
- data/share/gccxml-0.9/GCC/3.3/bits/fstream.tcc +530 -0
- data/share/gccxml-0.9/GCC/3.3/bits/list.tcc +378 -0
- data/share/gccxml-0.9/GCC/3.3/bits/locale_facets.h +2050 -0
- data/share/gccxml-0.9/GCC/3.3/bits/messages_members.h +108 -0
- data/share/gccxml-0.9/GCC/3.3/bits/sstream.tcc +243 -0
- data/share/gccxml-0.9/GCC/3.3/bits/stl_deque.h +1603 -0
- data/share/gccxml-0.9/GCC/3.3/bits/stl_list.h +1167 -0
- data/share/gccxml-0.9/GCC/3.3/bits/stl_tree.h +1462 -0
- data/share/gccxml-0.9/GCC/3.3/bits/stl_vector.h +992 -0
- data/share/gccxml-0.9/GCC/3.3/bits/valarray_meta.h +1135 -0
- data/share/gccxml-0.9/GCC/3.3/fstream +842 -0
- data/share/gccxml-0.9/GCC/3.3/gccxml_builtins.h +22 -0
- data/share/gccxml-0.9/GCC/3.3/sstream +638 -0
- data/share/gccxml-0.9/GCC/3.4/gccxml_builtins.h +91 -0
- data/share/gccxml-0.9/GCC/4.0/gccxml_builtins.h +128 -0
- data/share/gccxml-0.9/GCC/4.1/bits/gthr-default.h +618 -0
- data/share/gccxml-0.9/GCC/4.1/gccxml_builtins.h +131 -0
- data/share/gccxml-0.9/GCC/4.2/gccxml_builtins.h +131 -0
- data/share/gccxml-0.9/GCC/find_flags +105 -0
- data/share/gccxml-0.9/Intel/find_flags +56 -0
- data/share/gccxml-0.9/Intel/pthread.h +16 -0
- data/share/gccxml-0.9/MIPSpro/7.3/exception +9 -0
- data/share/gccxml-0.9/MIPSpro/7.3/gccxml_mpro_internals.h +21 -0
- data/share/gccxml-0.9/MIPSpro/7.3/iomanip +161 -0
- data/share/gccxml-0.9/MIPSpro/7.3/ostream +9 -0
- data/share/gccxml-0.9/MIPSpro/7.3/stddef.h +9 -0
- data/share/gccxml-0.9/MIPSpro/7.3/stl_config.h +9 -0
- data/share/gccxml-0.9/MIPSpro/7.3/stl_locale.h +17 -0
- data/share/gccxml-0.9/MIPSpro/7.3/stl_monetary.h +14 -0
- data/share/gccxml-0.9/MIPSpro/7.3/stl_numeric_facets.h +13 -0
- data/share/gccxml-0.9/MIPSpro/7.3/stl_threads.h +11 -0
- data/share/gccxml-0.9/MIPSpro/7.3/string +18 -0
- data/share/gccxml-0.9/MIPSpro/find_flags +137 -0
- data/share/gccxml-0.9/Sun/5.8/adaptation.patch +168 -0
- data/share/gccxml-0.9/Sun/README +8 -0
- data/share/gccxml-0.9/Sun/adapt_headers.sh +24 -0
- data/share/gccxml-0.9/Sun/find_flags +69 -0
- data/share/gccxml-0.9/gccxml_config +2 -0
- data/share/gccxml-0.9/gccxml_find_flags +93 -0
- data/share/man/man1/gccxml.1 +246 -0
- metadata +324 -0
@@ -0,0 +1,378 @@
|
|
1
|
+
// List implementation (out of line) -*- C++ -*-
|
2
|
+
|
3
|
+
// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
4
|
+
//
|
5
|
+
// This file is part of the GNU ISO C++ Library. This library is free
|
6
|
+
// software; you can redistribute it and/or modify it under the
|
7
|
+
// terms of the GNU General Public License as published by the
|
8
|
+
// Free Software Foundation; either version 2, or (at your option)
|
9
|
+
// any later version.
|
10
|
+
|
11
|
+
// This library is distributed in the hope that it will be useful,
|
12
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
// GNU General Public License for more details.
|
15
|
+
|
16
|
+
// You should have received a copy of the GNU General Public License along
|
17
|
+
// with this library; see the file COPYING. If not, write to the Free
|
18
|
+
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
19
|
+
// USA.
|
20
|
+
|
21
|
+
// As a special exception, you may use this file as part of a free software
|
22
|
+
// library without restriction. Specifically, if other files instantiate
|
23
|
+
// templates or use macros or inline functions from this file, or you compile
|
24
|
+
// this file and link it with other files to produce an executable, this
|
25
|
+
// file does not by itself cause the resulting executable to be covered by
|
26
|
+
// the GNU General Public License. This exception does not however
|
27
|
+
// invalidate any other reasons why the executable file might be covered by
|
28
|
+
// the GNU General Public License.
|
29
|
+
|
30
|
+
/*
|
31
|
+
*
|
32
|
+
* Copyright (c) 1994
|
33
|
+
* Hewlett-Packard Company
|
34
|
+
*
|
35
|
+
* Permission to use, copy, modify, distribute and sell this software
|
36
|
+
* and its documentation for any purpose is hereby granted without fee,
|
37
|
+
* provided that the above copyright notice appear in all copies and
|
38
|
+
* that both that copyright notice and this permission notice appear
|
39
|
+
* in supporting documentation. Hewlett-Packard Company makes no
|
40
|
+
* representations about the suitability of this software for any
|
41
|
+
* purpose. It is provided "as is" without express or implied warranty.
|
42
|
+
*
|
43
|
+
*
|
44
|
+
* Copyright (c) 1996,1997
|
45
|
+
* Silicon Graphics Computer Systems, Inc.
|
46
|
+
*
|
47
|
+
* Permission to use, copy, modify, distribute and sell this software
|
48
|
+
* and its documentation for any purpose is hereby granted without fee,
|
49
|
+
* provided that the above copyright notice appear in all copies and
|
50
|
+
* that both that copyright notice and this permission notice appear
|
51
|
+
* in supporting documentation. Silicon Graphics makes no
|
52
|
+
* representations about the suitability of this software for any
|
53
|
+
* purpose. It is provided "as is" without express or implied warranty.
|
54
|
+
*/
|
55
|
+
|
56
|
+
/** @file list.tcc
|
57
|
+
* This is an internal header file, included by other library headers.
|
58
|
+
* You should not attempt to use it directly.
|
59
|
+
*/
|
60
|
+
|
61
|
+
#ifndef __GLIBCPP_INTERNAL_LIST_TCC
|
62
|
+
#define __GLIBCPP_INTERNAL_LIST_TCC
|
63
|
+
|
64
|
+
namespace std
|
65
|
+
{
|
66
|
+
template<typename _Tp, typename _Alloc>
|
67
|
+
void
|
68
|
+
_List_base<_Tp,_Alloc>::
|
69
|
+
__clear()
|
70
|
+
{
|
71
|
+
typedef _List_node<_Tp> _Node;
|
72
|
+
_Node* __cur = static_cast<_Node*>(this->_M_node->_M_next);
|
73
|
+
while (__cur != this->_M_node)
|
74
|
+
{
|
75
|
+
_Node* __tmp = __cur;
|
76
|
+
__cur = static_cast<_Node*>(__cur->_M_next);
|
77
|
+
_Destroy(&__tmp->_M_data);
|
78
|
+
_M_put_node(__tmp);
|
79
|
+
}
|
80
|
+
this->_M_node->_M_next = this->_M_node;
|
81
|
+
this->_M_node->_M_prev = this->_M_node;
|
82
|
+
}
|
83
|
+
|
84
|
+
template<typename _Tp, typename _Alloc>
|
85
|
+
typename list<_Tp,_Alloc>::iterator
|
86
|
+
list<_Tp,_Alloc>::
|
87
|
+
insert(iterator __position, const value_type& __x)
|
88
|
+
{
|
89
|
+
_Node* __tmp = _M_create_node(__x);
|
90
|
+
__tmp->_M_next = __position._M_node;
|
91
|
+
__tmp->_M_prev = __position._M_node->_M_prev;
|
92
|
+
__position._M_node->_M_prev->_M_next = __tmp;
|
93
|
+
__position._M_node->_M_prev = __tmp;
|
94
|
+
return __tmp;
|
95
|
+
}
|
96
|
+
|
97
|
+
template<typename _Tp, typename _Alloc>
|
98
|
+
typename list<_Tp,_Alloc>::iterator
|
99
|
+
list<_Tp,_Alloc>::
|
100
|
+
erase(iterator __position)
|
101
|
+
{
|
102
|
+
_List_node_base* __next_node = __position._M_node->_M_next;
|
103
|
+
_List_node_base* __prev_node = __position._M_node->_M_prev;
|
104
|
+
_Node* __n = static_cast<_Node*>(__position._M_node);
|
105
|
+
__prev_node->_M_next = __next_node;
|
106
|
+
__next_node->_M_prev = __prev_node;
|
107
|
+
_Destroy(&__n->_M_data);
|
108
|
+
_M_put_node(__n);
|
109
|
+
return iterator(static_cast<_Node*>(__next_node));
|
110
|
+
}
|
111
|
+
|
112
|
+
template<typename _Tp, typename _Alloc>
|
113
|
+
void
|
114
|
+
list<_Tp,_Alloc>::
|
115
|
+
resize(size_type __new_size, const value_type& __x)
|
116
|
+
{
|
117
|
+
iterator __i = begin();
|
118
|
+
size_type __len = 0;
|
119
|
+
for ( ; __i != end() && __len < __new_size; ++__i, ++__len)
|
120
|
+
;
|
121
|
+
if (__len == __new_size)
|
122
|
+
erase(__i, end());
|
123
|
+
else // __i == end()
|
124
|
+
insert(end(), __new_size - __len, __x);
|
125
|
+
}
|
126
|
+
|
127
|
+
template<typename _Tp, typename _Alloc>
|
128
|
+
list<_Tp,_Alloc>&
|
129
|
+
list<_Tp,_Alloc>::
|
130
|
+
operator=(const list& __x)
|
131
|
+
{
|
132
|
+
if (this != &__x)
|
133
|
+
{
|
134
|
+
iterator __first1 = begin();
|
135
|
+
iterator __last1 = end();
|
136
|
+
const_iterator __first2 = __x.begin();
|
137
|
+
const_iterator __last2 = __x.end();
|
138
|
+
while (__first1 != __last1 && __first2 != __last2)
|
139
|
+
*__first1++ = *__first2++;
|
140
|
+
if (__first2 == __last2)
|
141
|
+
erase(__first1, __last1);
|
142
|
+
else
|
143
|
+
insert(__last1, __first2, __last2);
|
144
|
+
}
|
145
|
+
return *this;
|
146
|
+
}
|
147
|
+
|
148
|
+
template<typename _Tp, typename _Alloc>
|
149
|
+
void
|
150
|
+
list<_Tp,_Alloc>::
|
151
|
+
_M_fill_assign(size_type __n, const value_type& __val)
|
152
|
+
{
|
153
|
+
iterator __i = begin();
|
154
|
+
for ( ; __i != end() && __n > 0; ++__i, --__n)
|
155
|
+
*__i = __val;
|
156
|
+
if (__n > 0)
|
157
|
+
insert(end(), __n, __val);
|
158
|
+
else
|
159
|
+
erase(__i, end());
|
160
|
+
}
|
161
|
+
|
162
|
+
template<typename _Tp, typename _Alloc>
|
163
|
+
template <typename _InputIter>
|
164
|
+
void
|
165
|
+
list<_Tp,_Alloc>::
|
166
|
+
_M_assign_dispatch(_InputIter __first2, _InputIter __last2, __false_type)
|
167
|
+
{
|
168
|
+
iterator __first1 = begin();
|
169
|
+
iterator __last1 = end();
|
170
|
+
for (; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2)
|
171
|
+
*__first1 = *__first2;
|
172
|
+
if (__first2 == __last2)
|
173
|
+
erase(__first1, __last1);
|
174
|
+
else
|
175
|
+
insert(__last1, __first2, __last2);
|
176
|
+
}
|
177
|
+
|
178
|
+
template<typename _Tp, typename _Alloc>
|
179
|
+
void
|
180
|
+
list<_Tp,_Alloc>::
|
181
|
+
remove(const value_type& __value)
|
182
|
+
{
|
183
|
+
iterator __first = begin();
|
184
|
+
iterator __last = end();
|
185
|
+
while (__first != __last)
|
186
|
+
{
|
187
|
+
iterator __next = __first;
|
188
|
+
++__next;
|
189
|
+
if (*__first == __value)
|
190
|
+
erase(__first);
|
191
|
+
__first = __next;
|
192
|
+
}
|
193
|
+
}
|
194
|
+
|
195
|
+
template<typename _Tp, typename _Alloc>
|
196
|
+
void
|
197
|
+
list<_Tp,_Alloc>::
|
198
|
+
unique()
|
199
|
+
{
|
200
|
+
iterator __first = begin();
|
201
|
+
iterator __last = end();
|
202
|
+
if (__first == __last) return;
|
203
|
+
iterator __next = __first;
|
204
|
+
while (++__next != __last)
|
205
|
+
{
|
206
|
+
if (*__first == *__next)
|
207
|
+
erase(__next);
|
208
|
+
else
|
209
|
+
__first = __next;
|
210
|
+
__next = __first;
|
211
|
+
}
|
212
|
+
}
|
213
|
+
|
214
|
+
template<typename _Tp, typename _Alloc>
|
215
|
+
void
|
216
|
+
list<_Tp,_Alloc>::
|
217
|
+
merge(list& __x)
|
218
|
+
{
|
219
|
+
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
220
|
+
// 300. list::merge() specification incomplete
|
221
|
+
if (this != &__x)
|
222
|
+
{
|
223
|
+
iterator __first1 = begin();
|
224
|
+
iterator __last1 = end();
|
225
|
+
iterator __first2 = __x.begin();
|
226
|
+
iterator __last2 = __x.end();
|
227
|
+
while (__first1 != __last1 && __first2 != __last2)
|
228
|
+
if (*__first2 < *__first1)
|
229
|
+
{
|
230
|
+
iterator __next = __first2;
|
231
|
+
_M_transfer(__first1, __first2, ++__next);
|
232
|
+
__first2 = __next;
|
233
|
+
}
|
234
|
+
else
|
235
|
+
++__first1;
|
236
|
+
if (__first2 != __last2)
|
237
|
+
_M_transfer(__last1, __first2, __last2);
|
238
|
+
}
|
239
|
+
}
|
240
|
+
|
241
|
+
// FIXME put this somewhere else
|
242
|
+
inline void
|
243
|
+
__List_base_reverse(_List_node_base* __p)
|
244
|
+
{
|
245
|
+
_List_node_base* __tmp = __p;
|
246
|
+
do {
|
247
|
+
std::swap(__tmp->_M_next, __tmp->_M_prev);
|
248
|
+
__tmp = __tmp->_M_prev; // Old next node is now prev.
|
249
|
+
} while (__tmp != __p);
|
250
|
+
}
|
251
|
+
|
252
|
+
template<typename _Tp, typename _Alloc>
|
253
|
+
void
|
254
|
+
list<_Tp,_Alloc>::
|
255
|
+
sort()
|
256
|
+
{
|
257
|
+
// Do nothing if the list has length 0 or 1.
|
258
|
+
if (_M_node->_M_next != _M_node && _M_node->_M_next->_M_next != _M_node)
|
259
|
+
{
|
260
|
+
list __carry;
|
261
|
+
list __counter[64];
|
262
|
+
int __fill = 0;
|
263
|
+
while (!empty())
|
264
|
+
{
|
265
|
+
__carry.splice(__carry.begin(), *this, begin());
|
266
|
+
int __i = 0;
|
267
|
+
while(__i < __fill && !__counter[__i].empty())
|
268
|
+
{
|
269
|
+
__counter[__i].merge(__carry);
|
270
|
+
__carry.swap(__counter[__i++]);
|
271
|
+
}
|
272
|
+
__carry.swap(__counter[__i]);
|
273
|
+
if (__i == __fill) ++__fill;
|
274
|
+
}
|
275
|
+
|
276
|
+
for (int __i = 1; __i < __fill; ++__i)
|
277
|
+
__counter[__i].merge(__counter[__i-1]);
|
278
|
+
swap(__counter[__fill-1]);
|
279
|
+
}
|
280
|
+
}
|
281
|
+
|
282
|
+
template<typename _Tp, typename _Alloc>
|
283
|
+
template <typename _Predicate>
|
284
|
+
void
|
285
|
+
list<_Tp,_Alloc>::
|
286
|
+
remove_if(_Predicate __pred)
|
287
|
+
{
|
288
|
+
iterator __first = begin();
|
289
|
+
iterator __last = end();
|
290
|
+
while (__first != __last)
|
291
|
+
{
|
292
|
+
iterator __next = __first;
|
293
|
+
++__next;
|
294
|
+
if (__pred(*__first)) erase(__first);
|
295
|
+
__first = __next;
|
296
|
+
}
|
297
|
+
}
|
298
|
+
|
299
|
+
template<typename _Tp, typename _Alloc>
|
300
|
+
template <typename _BinaryPredicate>
|
301
|
+
void
|
302
|
+
list<_Tp,_Alloc>::
|
303
|
+
unique(_BinaryPredicate __binary_pred)
|
304
|
+
{
|
305
|
+
iterator __first = begin();
|
306
|
+
iterator __last = end();
|
307
|
+
if (__first == __last) return;
|
308
|
+
iterator __next = __first;
|
309
|
+
while (++__next != __last)
|
310
|
+
{
|
311
|
+
if (__binary_pred(*__first, *__next))
|
312
|
+
erase(__next);
|
313
|
+
else
|
314
|
+
__first = __next;
|
315
|
+
__next = __first;
|
316
|
+
}
|
317
|
+
}
|
318
|
+
|
319
|
+
template<typename _Tp, typename _Alloc>
|
320
|
+
template <typename _StrictWeakOrdering>
|
321
|
+
void
|
322
|
+
list<_Tp,_Alloc>::
|
323
|
+
merge(list& __x, _StrictWeakOrdering __comp)
|
324
|
+
{
|
325
|
+
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
326
|
+
// 300. list::merge() specification incomplete
|
327
|
+
if (this != &__x)
|
328
|
+
{
|
329
|
+
iterator __first1 = begin();
|
330
|
+
iterator __last1 = end();
|
331
|
+
iterator __first2 = __x.begin();
|
332
|
+
iterator __last2 = __x.end();
|
333
|
+
while (__first1 != __last1 && __first2 != __last2)
|
334
|
+
if (__comp(*__first2, *__first1))
|
335
|
+
{
|
336
|
+
iterator __next = __first2;
|
337
|
+
_M_transfer(__first1, __first2, ++__next);
|
338
|
+
__first2 = __next;
|
339
|
+
}
|
340
|
+
else
|
341
|
+
++__first1;
|
342
|
+
if (__first2 != __last2) _M_transfer(__last1, __first2, __last2);
|
343
|
+
}
|
344
|
+
}
|
345
|
+
|
346
|
+
template<typename _Tp, typename _Alloc>
|
347
|
+
template <typename _StrictWeakOrdering>
|
348
|
+
void
|
349
|
+
list<_Tp,_Alloc>::
|
350
|
+
sort(_StrictWeakOrdering __comp)
|
351
|
+
{
|
352
|
+
// Do nothing if the list has length 0 or 1.
|
353
|
+
if (_M_node->_M_next != _M_node && _M_node->_M_next->_M_next != _M_node)
|
354
|
+
{
|
355
|
+
list __carry;
|
356
|
+
list __counter[64];
|
357
|
+
int __fill = 0;
|
358
|
+
while (!empty())
|
359
|
+
{
|
360
|
+
__carry.splice(__carry.begin(), *this, begin());
|
361
|
+
int __i = 0;
|
362
|
+
while(__i < __fill && !__counter[__i].empty())
|
363
|
+
{
|
364
|
+
__counter[__i].merge(__carry, __comp);
|
365
|
+
__carry.swap(__counter[__i++]);
|
366
|
+
}
|
367
|
+
__carry.swap(__counter[__i]);
|
368
|
+
if (__i == __fill) ++__fill;
|
369
|
+
}
|
370
|
+
|
371
|
+
for (int __i = 1; __i < __fill; ++__i)
|
372
|
+
__counter[__i].merge(__counter[__i-1], __comp);
|
373
|
+
swap(__counter[__fill-1]);
|
374
|
+
}
|
375
|
+
}
|
376
|
+
} // namespace std
|
377
|
+
|
378
|
+
#endif /* __GLIBCPP_INTERNAL_LIST_TCC */
|