Makefile.am (std_headers): Update list with new names.
authorPhil Edwards <pme@gcc.gnu.org>
Sat, 12 Jan 2002 00:50:04 +0000 (00:50 +0000)
committerPhil Edwards <pme@gcc.gnu.org>
Sat, 12 Jan 2002 00:50:04 +0000 (00:50 +0000)
2002-01-11  Phil Edwards  <pme@gcc.gnu.org>

* include/Makefile.am (std_headers):  Update list with new names.
(stamp-std):  Link to standardized name.
* include/Makefile.in:  Regenerate.

* include/std/algorithm, include/std/bitset, include/std/complex,
include/std/deque, include/std/fstream, include/std/functional,
include/std/iomanip, include/std/ios, include/std/iosfwd,
include/std/iostream, include/std/istream, include/std/iterator,
include/std/limits, include/std/list, include/std/locale,
include/std/map, include/std/memory, include/std/numeric,
include/std/ostream, include/std/queue, include/std/set,
include/std/sstream, include/std/stack, include/std/stdexcept,
include/std/streambuf, include/std/string, include/std/utility,
include/std/valarray, include/std/vector:  Rename to...

* include/std/std_algorithm.h, include/std/std_bitset.h,
include/std/std_complex.h, include/std/std_deque.h,
include/std/std_fstream.h, include/std/std_functional.h,
include/std/std_iomanip.h, include/std/std_ios.h,
include/std/std_iosfwd.h, include/std/std_iostream.h,
include/std/std_istream.h, include/std/std_iterator.h,
include/std/std_limits.h, include/std/std_list.h,
include/std/std_locale.h, include/std/std_map.h,
include/std/std_memory.h, include/std/std_numeric.h,
include/std/std_ostream.h, include/std/std_queue.h,
include/std/std_set.h, include/std/std_sstream.h,
include/std/std_stack.h, include/std/std_stdexcept.h,
include/std/std_streambuf.h, include/std/std_string.h,
include/std/std_utility.h, include/std/std_valarray.h,
include/std/std_vector.h:  ...this.

From-SVN: r48788

61 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/std/algorithm [deleted file]
libstdc++-v3/include/std/bitset [deleted file]
libstdc++-v3/include/std/complex [deleted file]
libstdc++-v3/include/std/deque [deleted file]
libstdc++-v3/include/std/fstream [deleted file]
libstdc++-v3/include/std/functional [deleted file]
libstdc++-v3/include/std/iomanip [deleted file]
libstdc++-v3/include/std/ios [deleted file]
libstdc++-v3/include/std/iosfwd [deleted file]
libstdc++-v3/include/std/iostream [deleted file]
libstdc++-v3/include/std/istream [deleted file]
libstdc++-v3/include/std/iterator [deleted file]
libstdc++-v3/include/std/limits [deleted file]
libstdc++-v3/include/std/list [deleted file]
libstdc++-v3/include/std/locale [deleted file]
libstdc++-v3/include/std/map [deleted file]
libstdc++-v3/include/std/memory [deleted file]
libstdc++-v3/include/std/numeric [deleted file]
libstdc++-v3/include/std/ostream [deleted file]
libstdc++-v3/include/std/queue [deleted file]
libstdc++-v3/include/std/set [deleted file]
libstdc++-v3/include/std/sstream [deleted file]
libstdc++-v3/include/std/stack [deleted file]
libstdc++-v3/include/std/std_algorithm.h [new file with mode: 0644]
libstdc++-v3/include/std/std_bitset.h [new file with mode: 0644]
libstdc++-v3/include/std/std_complex.h [new file with mode: 0644]
libstdc++-v3/include/std/std_deque.h [new file with mode: 0644]
libstdc++-v3/include/std/std_fstream.h [new file with mode: 0644]
libstdc++-v3/include/std/std_functional.h [new file with mode: 0644]
libstdc++-v3/include/std/std_iomanip.h [new file with mode: 0644]
libstdc++-v3/include/std/std_ios.h [new file with mode: 0644]
libstdc++-v3/include/std/std_iosfwd.h [new file with mode: 0644]
libstdc++-v3/include/std/std_iostream.h [new file with mode: 0644]
libstdc++-v3/include/std/std_istream.h [new file with mode: 0644]
libstdc++-v3/include/std/std_iterator.h [new file with mode: 0644]
libstdc++-v3/include/std/std_limits.h [new file with mode: 0644]
libstdc++-v3/include/std/std_list.h [new file with mode: 0644]
libstdc++-v3/include/std/std_locale.h [new file with mode: 0644]
libstdc++-v3/include/std/std_map.h [new file with mode: 0644]
libstdc++-v3/include/std/std_memory.h [new file with mode: 0644]
libstdc++-v3/include/std/std_numeric.h [new file with mode: 0644]
libstdc++-v3/include/std/std_ostream.h [new file with mode: 0644]
libstdc++-v3/include/std/std_queue.h [new file with mode: 0644]
libstdc++-v3/include/std/std_set.h [new file with mode: 0644]
libstdc++-v3/include/std/std_sstream.h [new file with mode: 0644]
libstdc++-v3/include/std/std_stack.h [new file with mode: 0644]
libstdc++-v3/include/std/std_stdexcept.h [new file with mode: 0644]
libstdc++-v3/include/std/std_streambuf.h [new file with mode: 0644]
libstdc++-v3/include/std/std_string.h [new file with mode: 0644]
libstdc++-v3/include/std/std_utility.h [new file with mode: 0644]
libstdc++-v3/include/std/std_valarray.h [new file with mode: 0644]
libstdc++-v3/include/std/std_vector.h [new file with mode: 0644]
libstdc++-v3/include/std/stdexcept [deleted file]
libstdc++-v3/include/std/streambuf [deleted file]
libstdc++-v3/include/std/string [deleted file]
libstdc++-v3/include/std/utility [deleted file]
libstdc++-v3/include/std/valarray [deleted file]
libstdc++-v3/include/std/vector [deleted file]

index ce6e4414454e314269fedc09ea4b97b38733ee7f..d2d31e64fd6734c84a1b33577fbf849211da399e 100644 (file)
@@ -1,3 +1,36 @@
+2002-01-11  Phil Edwards  <pme@gcc.gnu.org>
+
+       * include/Makefile.am (std_headers):  Update list with new names.
+       (stamp-std):  Link to standardized name.
+       * include/Makefile.in:  Regenerate.
+
+       * include/std/algorithm, include/std/bitset, include/std/complex,
+       include/std/deque, include/std/fstream, include/std/functional,
+       include/std/iomanip, include/std/ios, include/std/iosfwd,
+       include/std/iostream, include/std/istream, include/std/iterator,
+       include/std/limits, include/std/list, include/std/locale,
+       include/std/map, include/std/memory, include/std/numeric,
+       include/std/ostream, include/std/queue, include/std/set,
+       include/std/sstream, include/std/stack, include/std/stdexcept,
+       include/std/streambuf, include/std/string, include/std/utility,
+       include/std/valarray, include/std/vector:  Rename to...
+
+       * include/std/std_algorithm.h, include/std/std_bitset.h,
+       include/std/std_complex.h, include/std/std_deque.h,
+       include/std/std_fstream.h, include/std/std_functional.h,
+       include/std/std_iomanip.h, include/std/std_ios.h,
+       include/std/std_iosfwd.h, include/std/std_iostream.h,
+       include/std/std_istream.h, include/std/std_iterator.h,
+       include/std/std_limits.h, include/std/std_list.h,
+       include/std/std_locale.h, include/std/std_map.h,
+       include/std/std_memory.h, include/std/std_numeric.h,
+       include/std/std_ostream.h, include/std/std_queue.h,
+       include/std/std_set.h, include/std/std_sstream.h,
+       include/std/std_stack.h, include/std/std_stdexcept.h,
+       include/std/std_streambuf.h, include/std/std_string.h,
+       include/std/std_utility.h, include/std/std_valarray.h,
+       include/std/std_vector.h:  ...this.
+
 2002-01-11  Loren Rittle <ljrittle@acm.org>
 
        * include/Makefile.am (extra_target_headers): New list of all
index 1ff45bd8f32ac1ba05970ca5aaac5d3c5363be55..b6472ac5a4230cdaedcaea81f646c2cd3ece3721 100644 (file)
@@ -185,35 +185,35 @@ c_base_headers = \
 std_srcdir = ${glibcpp_srcdir}/include/std
 std_builddir = ./
 std_headers = \
-       ${std_srcdir}/algorithm \
-       ${std_srcdir}/bitset \
-       ${std_srcdir}/complex \
-       ${std_srcdir}/deque \
-       ${std_srcdir}/fstream \
-       ${std_srcdir}/functional \
-       ${std_srcdir}/iomanip \
-       ${std_srcdir}/ios \
-       ${std_srcdir}/iosfwd \
-       ${std_srcdir}/iostream \
-       ${std_srcdir}/istream \
-       ${std_srcdir}/iterator \
-       ${std_srcdir}/limits \
-       ${std_srcdir}/list \
-       ${std_srcdir}/locale \
-       ${std_srcdir}/map \
-       ${std_srcdir}/memory \
-       ${std_srcdir}/numeric \
-       ${std_srcdir}/ostream \
-       ${std_srcdir}/queue \
-       ${std_srcdir}/set \
-       ${std_srcdir}/sstream \
-       ${std_srcdir}/stack \
-       ${std_srcdir}/stdexcept \
-       ${std_srcdir}/streambuf \
-       ${std_srcdir}/string \
-       ${std_srcdir}/utility \
-       ${std_srcdir}/valarray \
-       ${std_srcdir}/vector 
+       ${std_srcdir}/std_algorithm.h \
+       ${std_srcdir}/std_bitset.h \
+       ${std_srcdir}/std_complex.h \
+       ${std_srcdir}/std_deque.h \
+       ${std_srcdir}/std_fstream.h \
+       ${std_srcdir}/std_functional.h \
+       ${std_srcdir}/std_iomanip.h \
+       ${std_srcdir}/std_ios.h \
+       ${std_srcdir}/std_iosfwd.h \
+       ${std_srcdir}/std_iostream.h \
+       ${std_srcdir}/std_istream.h \
+       ${std_srcdir}/std_iterator.h \
+       ${std_srcdir}/std_limits.h \
+       ${std_srcdir}/std_list.h \
+       ${std_srcdir}/std_locale.h \
+       ${std_srcdir}/std_map.h \
+       ${std_srcdir}/std_memory.h \
+       ${std_srcdir}/std_numeric.h \
+       ${std_srcdir}/std_ostream.h \
+       ${std_srcdir}/std_queue.h \
+       ${std_srcdir}/std_set.h \
+       ${std_srcdir}/std_sstream.h \
+       ${std_srcdir}/std_stack.h \
+       ${std_srcdir}/std_stdexcept.h \
+       ${std_srcdir}/std_streambuf.h \
+       ${std_srcdir}/std_string.h \
+       ${std_srcdir}/std_utility.h \
+       ${std_srcdir}/std_valarray.h \
+       ${std_srcdir}/std_vector.h
 
 target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@
 target_builddir = ./${target_alias}/bits
@@ -248,11 +248,16 @@ allstamps = stamp-std stamp-bits stamp-c_base stamp-backward stamp-ext \
 # Here are the rules for building the headers
 all-local: ${target_builddir}/c++config.h ${allstamps}
 
+# This rule is slightly different, in that we must change the name of the
+# local file from std_foo.h to foo.
 stamp-std: ${std_headers}
        @if [ ! -d "${std_builddir}" ]; then \
          mkdir -p ${std_builddir} ;\
        fi ;\
-       (cd ${std_builddir} && @LN_S@ $? . || true) ;\
+       (cd ${std_builddir} && for h in $?; do \
+         official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
+         @LN_S@ $$h ./$${official_name || true} ;\
+       done) ;\
        echo `date` > stamp-std 
 
 stamp-bits: ${bits_headers}
index 70fee33be73cc1c8a128f1e1d2f2ba23e4977e13..52580447234f47777399f38140ab6f02923adc13 100644 (file)
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
 
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -158,45 +158,224 @@ glibcpp_builddir = @glibcpp_builddir@
 
 bits_srcdir = ${glibcpp_srcdir}/include/bits
 bits_builddir = ./bits
-bits_headers =         ${bits_srcdir}/basic_file.h     ${bits_srcdir}/basic_ios.h      ${bits_srcdir}/basic_ios.tcc    ${bits_srcdir}/basic_string.h   ${bits_srcdir}/basic_string.tcc         ${bits_srcdir}/boost_concept_check.h    ${bits_srcdir}/char_traits.h    ${bits_srcdir}/codecvt.h        ${bits_srcdir}/concept_check.h  ${bits_srcdir}/cpp_type_traits.h        ${bits_srcdir}/fpos.h   ${bits_srcdir}/fstream.tcc      ${bits_srcdir}/functexcept.h    ${bits_srcdir}/generic_shadow.h         ${bits_srcdir}/gslice.h         ${bits_srcdir}/gslice_array.h   ${bits_srcdir}/indirect_array.h         ${bits_srcdir}/ios_base.h       ${bits_srcdir}/istream.tcc      ${bits_srcdir}/locale_facets.h  ${bits_srcdir}/locale_facets.tcc        ${bits_srcdir}/localefwd.h      ${bits_srcdir}/mask_array.h     ${bits_srcdir}/ostream.tcc      ${bits_srcdir}/pthread_allocimpl.h      ${bits_srcdir}/stream_iterator.h        ${bits_srcdir}/streambuf_iterator.h     ${bits_srcdir}/slice.h  ${bits_srcdir}/slice_array.h    ${bits_srcdir}/sstream.tcc      ${bits_srcdir}/stl_algo.h       ${bits_srcdir}/stl_algobase.h   ${bits_srcdir}/stl_alloc.h      ${bits_srcdir}/stl_bvector.h    ${bits_srcdir}/stl_construct.h  ${bits_srcdir}/stl_deque.h      ${bits_srcdir}/stl_function.h   ${bits_srcdir}/stl_heap.h       ${bits_srcdir}/stl_iterator.h   ${bits_srcdir}/stl_iterator_base_funcs.h        ${bits_srcdir}/stl_iterator_base_types.h        ${bits_srcdir}/stl_list.h       ${bits_srcdir}/stl_map.h        ${bits_srcdir}/stl_multimap.h   ${bits_srcdir}/stl_multiset.h   ${bits_srcdir}/stl_numeric.h    ${bits_srcdir}/stl_pair.h       ${bits_srcdir}/stl_pthread_alloc.h      ${bits_srcdir}/stl_queue.h      ${bits_srcdir}/stl_raw_storage_iter.h   ${bits_srcdir}/stl_relops.h     ${bits_srcdir}/stl_set.h        ${bits_srcdir}/stl_stack.h      ${bits_srcdir}/stl_tempbuf.h    ${bits_srcdir}/stl_threads.h    ${bits_srcdir}/stl_tree.h       ${bits_srcdir}/stl_uninitialized.h      ${bits_srcdir}/stl_vector.h     ${bits_srcdir}/streambuf.tcc    ${bits_srcdir}/stringfwd.h      ${bits_srcdir}/type_traits.h    ${bits_srcdir}/valarray_array.h         ${bits_srcdir}/valarray_array.tcc       ${bits_srcdir}/valarray_meta.h
+bits_headers = \
+       ${bits_srcdir}/basic_file.h \
+       ${bits_srcdir}/basic_ios.h \
+       ${bits_srcdir}/basic_ios.tcc \
+       ${bits_srcdir}/basic_string.h \
+       ${bits_srcdir}/basic_string.tcc \
+       ${bits_srcdir}/boost_concept_check.h \
+       ${bits_srcdir}/char_traits.h \
+       ${bits_srcdir}/codecvt.h \
+       ${bits_srcdir}/concept_check.h \
+       ${bits_srcdir}/cpp_type_traits.h \
+       ${bits_srcdir}/fpos.h \
+       ${bits_srcdir}/fstream.tcc \
+       ${bits_srcdir}/functexcept.h \
+       ${bits_srcdir}/generic_shadow.h \
+       ${bits_srcdir}/gslice.h \
+       ${bits_srcdir}/gslice_array.h \
+       ${bits_srcdir}/indirect_array.h \
+       ${bits_srcdir}/ios_base.h \
+       ${bits_srcdir}/istream.tcc \
+       ${bits_srcdir}/locale_facets.h \
+       ${bits_srcdir}/locale_facets.tcc \
+       ${bits_srcdir}/localefwd.h \
+       ${bits_srcdir}/mask_array.h \
+       ${bits_srcdir}/ostream.tcc \
+       ${bits_srcdir}/pthread_allocimpl.h \
+       ${bits_srcdir}/stream_iterator.h \
+       ${bits_srcdir}/streambuf_iterator.h \
+       ${bits_srcdir}/slice.h \
+       ${bits_srcdir}/slice_array.h \
+       ${bits_srcdir}/sstream.tcc \
+       ${bits_srcdir}/stl_algo.h \
+       ${bits_srcdir}/stl_algobase.h \
+       ${bits_srcdir}/stl_alloc.h \
+       ${bits_srcdir}/stl_bvector.h \
+       ${bits_srcdir}/stl_construct.h \
+       ${bits_srcdir}/stl_deque.h \
+       ${bits_srcdir}/stl_function.h \
+       ${bits_srcdir}/stl_heap.h \
+       ${bits_srcdir}/stl_iterator.h \
+       ${bits_srcdir}/stl_iterator_base_funcs.h \
+       ${bits_srcdir}/stl_iterator_base_types.h \
+       ${bits_srcdir}/stl_list.h \
+       ${bits_srcdir}/stl_map.h \
+       ${bits_srcdir}/stl_multimap.h \
+       ${bits_srcdir}/stl_multiset.h \
+       ${bits_srcdir}/stl_numeric.h \
+       ${bits_srcdir}/stl_pair.h \
+       ${bits_srcdir}/stl_pthread_alloc.h \
+       ${bits_srcdir}/stl_queue.h \
+       ${bits_srcdir}/stl_raw_storage_iter.h \
+       ${bits_srcdir}/stl_relops.h \
+       ${bits_srcdir}/stl_set.h \
+       ${bits_srcdir}/stl_stack.h \
+       ${bits_srcdir}/stl_tempbuf.h \
+       ${bits_srcdir}/stl_threads.h \
+       ${bits_srcdir}/stl_tree.h \
+       ${bits_srcdir}/stl_uninitialized.h \
+       ${bits_srcdir}/stl_vector.h \
+       ${bits_srcdir}/streambuf.tcc \
+       ${bits_srcdir}/stringfwd.h \
+       ${bits_srcdir}/type_traits.h \
+       ${bits_srcdir}/valarray_array.h \
+       ${bits_srcdir}/valarray_array.tcc \
+       ${bits_srcdir}/valarray_meta.h
 
 
 backward_srcdir = ${glibcpp_srcdir}/include/backward
 backward_builddir = ./backward
-backward_headers =     ${backward_srcdir}/complex.h    ${backward_srcdir}/iomanip.h    ${backward_srcdir}/istream.h    ${backward_srcdir}/ostream.h    ${backward_srcdir}/stream.h     ${backward_srcdir}/streambuf.h  ${backward_srcdir}/algo.h       ${backward_srcdir}/algobase.h   ${backward_srcdir}/alloc.h      ${backward_srcdir}/bvector.h    ${backward_srcdir}/defalloc.h   ${backward_srcdir}/deque.h      ${backward_srcdir}/function.h   ${backward_srcdir}/hash_map.h   ${backward_srcdir}/hash_set.h   ${backward_srcdir}/hashtable.h  ${backward_srcdir}/heap.h       ${backward_srcdir}/iostream.h   ${backward_srcdir}/iterator.h   ${backward_srcdir}/list.h       ${backward_srcdir}/map.h        ${backward_srcdir}/multimap.h   ${backward_srcdir}/new.h        ${backward_srcdir}/multiset.h   ${backward_srcdir}/pair.h       ${backward_srcdir}/queue.h      ${backward_srcdir}/rope.h       ${backward_srcdir}/set.h        ${backward_srcdir}/slist.h      ${backward_srcdir}/stack.h      ${backward_srcdir}/tempbuf.h    ${backward_srcdir}/tree.h       ${backward_srcdir}/vector.h     ${backward_srcdir}/fstream.h    ${backward_srcdir}/strstream.h  ${backward_srcdir}/strstream    ${backward_srcdir}/backward_warning.h
+backward_headers = \
+       ${backward_srcdir}/complex.h \
+       ${backward_srcdir}/iomanip.h \
+       ${backward_srcdir}/istream.h \
+       ${backward_srcdir}/ostream.h \
+       ${backward_srcdir}/stream.h \
+       ${backward_srcdir}/streambuf.h \
+       ${backward_srcdir}/algo.h \
+       ${backward_srcdir}/algobase.h \
+       ${backward_srcdir}/alloc.h \
+       ${backward_srcdir}/bvector.h \
+       ${backward_srcdir}/defalloc.h \
+       ${backward_srcdir}/deque.h \
+       ${backward_srcdir}/function.h \
+       ${backward_srcdir}/hash_map.h \
+       ${backward_srcdir}/hash_set.h \
+       ${backward_srcdir}/hashtable.h \
+       ${backward_srcdir}/heap.h \
+       ${backward_srcdir}/iostream.h \
+       ${backward_srcdir}/iterator.h \
+       ${backward_srcdir}/list.h \
+       ${backward_srcdir}/map.h \
+       ${backward_srcdir}/multimap.h \
+       ${backward_srcdir}/new.h \
+       ${backward_srcdir}/multiset.h \
+       ${backward_srcdir}/pair.h \
+       ${backward_srcdir}/queue.h \
+       ${backward_srcdir}/rope.h \
+       ${backward_srcdir}/set.h \
+       ${backward_srcdir}/slist.h \
+       ${backward_srcdir}/stack.h \
+       ${backward_srcdir}/tempbuf.h \
+       ${backward_srcdir}/tree.h \
+       ${backward_srcdir}/vector.h \
+       ${backward_srcdir}/fstream.h \
+       ${backward_srcdir}/strstream.h \
+       ${backward_srcdir}/strstream \
+       ${backward_srcdir}/backward_warning.h
 
 
 ext_srcdir = ${glibcpp_srcdir}/include/ext
 ext_builddir = ./ext
-ext_headers =          ${ext_srcdir}/algorithm         ${ext_srcdir}/functional        ${ext_srcdir}/hash_map  ${ext_srcdir}/hash_set  ${ext_srcdir}/iterator  ${ext_srcdir}/memory    ${ext_srcdir}/numeric   ${ext_srcdir}/rb_tree   ${ext_srcdir}/rope      ${ext_srcdir}/ropeimpl.h        ${ext_srcdir}/slist     ${ext_srcdir}/stl_hash_fun.h    ${ext_srcdir}/stl_hashtable.h   ${ext_srcdir}/stl_rope.h
+ext_headers = \
+       ${ext_srcdir}/algorithm \
+       ${ext_srcdir}/functional \
+       ${ext_srcdir}/hash_map \
+       ${ext_srcdir}/hash_set \
+       ${ext_srcdir}/iterator \
+       ${ext_srcdir}/memory \
+       ${ext_srcdir}/numeric \
+       ${ext_srcdir}/rb_tree \
+       ${ext_srcdir}/rope \
+       ${ext_srcdir}/ropeimpl.h \
+       ${ext_srcdir}/slist \
+       ${ext_srcdir}/stl_hash_fun.h \
+       ${ext_srcdir}/stl_hashtable.h \
+       ${ext_srcdir}/stl_rope.h
 
 
 # This is the common subset of files that all three "C" header models use.
 c_base_srcdir = @C_INCLUDE_DIR@
 c_base_builddir = ./
-c_base_headers =       ${c_base_srcdir}/cassert        ${c_base_srcdir}/cctype         ${c_base_srcdir}/cerrno         ${c_base_srcdir}/cfloat         ${c_base_srcdir}/ciso646        ${c_base_srcdir}/climits        ${c_base_srcdir}/clocale        ${c_base_srcdir}/cmath  ${c_base_srcdir}/csetjmp        ${c_base_srcdir}/csignal        ${c_base_srcdir}/cstdarg        ${c_base_srcdir}/cstddef        ${c_base_srcdir}/cstdio         ${c_base_srcdir}/cstdlib        ${c_base_srcdir}/cstring        ${c_base_srcdir}/ctime  ${c_base_srcdir}/cwchar         ${c_base_srcdir}/cwctype        ${c_base_srcdir}/cmath.tcc 
+c_base_headers = \
+       ${c_base_srcdir}/cassert \
+       ${c_base_srcdir}/cctype \
+       ${c_base_srcdir}/cerrno \
+       ${c_base_srcdir}/cfloat \
+       ${c_base_srcdir}/ciso646 \
+       ${c_base_srcdir}/climits \
+       ${c_base_srcdir}/clocale \
+       ${c_base_srcdir}/cmath \
+       ${c_base_srcdir}/csetjmp \
+       ${c_base_srcdir}/csignal \
+       ${c_base_srcdir}/cstdarg \
+       ${c_base_srcdir}/cstddef \
+       ${c_base_srcdir}/cstdio \
+       ${c_base_srcdir}/cstdlib \
+       ${c_base_srcdir}/cstring \
+       ${c_base_srcdir}/ctime \
+       ${c_base_srcdir}/cwchar \
+       ${c_base_srcdir}/cwctype \
+       ${c_base_srcdir}/cmath.tcc 
 
 
 std_srcdir = ${glibcpp_srcdir}/include/std
 std_builddir = ./
-std_headers =          ${std_srcdir}/algorithm         ${std_srcdir}/bitset    ${std_srcdir}/complex   ${std_srcdir}/deque     ${std_srcdir}/fstream   ${std_srcdir}/functional        ${std_srcdir}/iomanip   ${std_srcdir}/ios       ${std_srcdir}/iosfwd    ${std_srcdir}/iostream  ${std_srcdir}/istream   ${std_srcdir}/iterator  ${std_srcdir}/limits    ${std_srcdir}/list      ${std_srcdir}/locale    ${std_srcdir}/map       ${std_srcdir}/memory    ${std_srcdir}/numeric   ${std_srcdir}/ostream   ${std_srcdir}/queue     ${std_srcdir}/set       ${std_srcdir}/sstream   ${std_srcdir}/stack     ${std_srcdir}/stdexcept         ${std_srcdir}/streambuf         ${std_srcdir}/string    ${std_srcdir}/utility   ${std_srcdir}/valarray  ${std_srcdir}/vector 
+std_headers = \
+       ${std_srcdir}/std_algorithm.h \
+       ${std_srcdir}/std_bitset.h \
+       ${std_srcdir}/std_complex.h \
+       ${std_srcdir}/std_deque.h \
+       ${std_srcdir}/std_fstream.h \
+       ${std_srcdir}/std_functional.h \
+       ${std_srcdir}/std_iomanip.h \
+       ${std_srcdir}/std_ios.h \
+       ${std_srcdir}/std_iosfwd.h \
+       ${std_srcdir}/std_iostream.h \
+       ${std_srcdir}/std_istream.h \
+       ${std_srcdir}/std_iterator.h \
+       ${std_srcdir}/std_limits.h \
+       ${std_srcdir}/std_list.h \
+       ${std_srcdir}/std_locale.h \
+       ${std_srcdir}/std_map.h \
+       ${std_srcdir}/std_memory.h \
+       ${std_srcdir}/std_numeric.h \
+       ${std_srcdir}/std_ostream.h \
+       ${std_srcdir}/std_queue.h \
+       ${std_srcdir}/std_set.h \
+       ${std_srcdir}/std_sstream.h \
+       ${std_srcdir}/std_stack.h \
+       ${std_srcdir}/std_stdexcept.h \
+       ${std_srcdir}/std_streambuf.h \
+       ${std_srcdir}/std_string.h \
+       ${std_srcdir}/std_utility.h \
+       ${std_srcdir}/std_valarray.h \
+       ${std_srcdir}/std_vector.h
 
 
 target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@
 target_builddir = ./${target_alias}/bits
-target_headers =       ${target_srcdir}/ctype_base.h   ${target_srcdir}/ctype_inline.h         ${target_srcdir}/ctype_noninline.h      ${target_srcdir}/os_defines.h   ${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h    ${glibcpp_srcdir}/@CPU_LIMITS_INC_SRCDIR@/cpu_limits.h 
+target_headers = \
+       ${target_srcdir}/ctype_base.h \
+       ${target_srcdir}/ctype_inline.h \
+       ${target_srcdir}/ctype_noninline.h \
+       ${target_srcdir}/os_defines.h \
+       ${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h \
+       ${glibcpp_srcdir}/@CPU_LIMITS_INC_SRCDIR@/cpu_limits.h 
 
 # These extra_target_headers files are all built with ad hoc naming rules.
-extra_target_headers =         ${target_builddir}/basic_file_model.h   ${target_builddir}/c++config.h  ${target_builddir}/c++io.h      ${target_builddir}/c++locale.h  ${target_builddir}/messages_members.h   ${target_builddir}/codecvt_specializations.h
+extra_target_headers = \
+       ${target_builddir}/basic_file_model.h \
+       ${target_builddir}/c++config.h \
+       ${target_builddir}/c++io.h \
+       ${target_builddir}/c++locale.h \
+       ${target_builddir}/messages_members.h \
+       ${target_builddir}/codecvt_specializations.h
 
 
 thread_builddir = ./${target_alias}/bits
-thread_headers =       ${thread_builddir}/gthr.h       ${thread_builddir}/gthr-single.h        ${thread_builddir}/gthr-default.h
+thread_headers = \
+       ${thread_builddir}/gthr.h \
+       ${thread_builddir}/gthr-single.h \
+       ${thread_builddir}/gthr-default.h
 
 
 # List of all timestamp files.  By keeping only one copy of this list, both
 # CLEANFILES and all-local are kept up-to-date.
-allstamps = stamp-std stamp-bits stamp-c_base stamp-backward stamp-ext         stamp-target stamp-thread 
+allstamps = stamp-std stamp-bits stamp-c_base stamp-backward stamp-ext \
+       stamp-target stamp-thread 
 
 
 # Target includes for threads
@@ -219,14 +398,14 @@ DIST_COMMON =  Makefile.am Makefile.in
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = tar
+TAR = gtar
 GZIP_ENV = --best
 all: all-redirect
 .SUFFIXES:
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
-       cd $(top_srcdir) && $(AUTOMAKE) --cygnus include/Makefile
+       cd $(top_srcdir) && $(AUTOMAKE) --gnits include/Makefile
 
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
        cd $(top_builddir) \
          && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
@@ -239,8 +418,13 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 subdir = include
 
 distdir: $(DISTFILES)
+       here=`cd $(top_builddir) && pwd`; \
+       top_distdir=`cd $(top_distdir) && pwd`; \
+       distdir=`cd $(distdir) && pwd`; \
+       cd $(top_srcdir) \
+         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits include/Makefile
        @for file in $(DISTFILES); do \
-         if test -f $$file; then d=.; else d=$(srcdir); fi; \
+         d=$(srcdir); \
          if test -d $$d/$$file; then \
            cp -pr $$d/$$file $(distdir)/$$file; \
          else \
@@ -253,12 +437,10 @@ info-am:
 info: info-am
 dvi-am:
 dvi: dvi-am
-check-am:
+check-am: all-am
 check: check-am
 installcheck-am:
 installcheck: installcheck-am
-install-info-am: 
-install-info: install-info-am
 install-exec-am:
 install-exec: install-exec-am
 
@@ -306,22 +488,26 @@ maintainer-clean-am:  maintainer-clean-generic distclean-am
 maintainer-clean: maintainer-clean-am
 
 .PHONY: tags distdir info-am info dvi-am dvi check check-am \
-installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-local install-data-am \
-install-data install-am install uninstall-am uninstall all-local \
-all-redirect all-am all installdirs mostlyclean-generic \
-distclean-generic clean-generic maintainer-clean-generic clean \
-mostlyclean distclean maintainer-clean
+installcheck-am installcheck install-exec-am install-exec \
+install-data-local install-data-am install-data install-am install \
+uninstall-am uninstall all-local all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
 
 
 # Here are the rules for building the headers
 all-local: ${target_builddir}/c++config.h ${allstamps}
 
+# This rule is slightly different, in that we must change the name of the
+# local file from std_foo.h to foo.
 stamp-std: ${std_headers}
        @if [ ! -d "${std_builddir}" ]; then \
          mkdir -p ${std_builddir} ;\
        fi ;\
-       (cd ${std_builddir} && @LN_S@ $? . || true) ;\
+       (cd ${std_builddir} && for h in $?; do \
+         official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
+         @LN_S@ $$h ./$${official_name || true} ;\
+       done) ;\
        echo `date` > stamp-std 
 
 stamp-bits: ${bits_headers}
diff --git a/libstdc++-v3/include/std/algorithm b/libstdc++-v3/include/std/algorithm
deleted file mode 100644 (file)
index 746eb47..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-// <algorithm> -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-/** @file std_algorithm.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_ALGORITHM
-#define _CPP_ALGORITHM 1
-
-#pragma GCC system_header
-
-#include <bits/stl_algobase.h>
-#include <bits/stl_construct.h>
-#include <bits/stl_uninitialized.h>
-#include <bits/stl_tempbuf.h>
-#include <bits/stl_algo.h>
-
-#endif /* _CPP_ALGORITHM */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/libstdc++-v3/include/std/bitset b/libstdc++-v3/include/std/bitset
deleted file mode 100644 (file)
index d9119e1..0000000
+++ /dev/null
@@ -1,814 +0,0 @@
-// <bitset> -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */ 
-
-/** @file std_bitset.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef __GLIBCPP_BITSET
-#define __GLIBCPP_BITSET
-
-#pragma GCC system_header
-
-// A bitset of size N has N % (sizeof(unsigned long) * CHAR_BIT) unused 
-// bits.  (They are the high- order bits in the highest word.)  It is
-// a class invariant of class bitset<> that those unused bits are
-// always zero.
-
-// Most of the actual code isn't contained in bitset<> itself, but in the 
-// base class _Base_bitset.  The base class works with whole words, not with
-// individual bits.  This allows us to specialize _Base_bitset for the
-// important special case where the bitset is only a single word.
-
-
-#include <cstddef>     // for size_t
-#include <cstring>     // for memset
-#include <string>
-#include <stdexcept>
-#include <bits/functexcept.h>   // for invalid_argument, out_of_range, 
-                                // overflow_error
-#include <ostream>     // for ostream (operator<<)
-#include <istream>     // for istream (operator>>)
-
-#define _GLIBCPP_BITSET_BITS_PER_WORD (CHAR_BIT*sizeof(unsigned long))
-#define __BITSET_WORDS(__n) \
- ((__n) < 1 ? 1 : ((__n) + _GLIBCPP_BITSET_BITS_PER_WORD - 1)/_GLIBCPP_BITSET_BITS_PER_WORD)
-
-namespace std
-{
-
-// structure to aid in counting bits
-template<bool __dummy> 
-struct _Bit_count {
-  static unsigned char _S_bit_count[256];
-};
-
-// Mapping from 8 bit unsigned integers to the index of the first one
-// bit:
-template<bool __dummy> 
-struct _First_one {
-  static unsigned char _S_first_one[256];
-};
-
-//
-// Base class: general case.
-//
-
-template<size_t _Nw>
-struct _Base_bitset {
-  typedef unsigned long _WordT;
-
-  _WordT _M_w[_Nw];                // 0 is the least significant word.
-
-  _Base_bitset( void ) { _M_do_reset(); }
-  _Base_bitset(unsigned long __val) {
-    _M_do_reset();
-    _M_w[0] = __val;
-  }
-
-  static size_t _S_whichword( size_t __pos )
-    { return __pos / _GLIBCPP_BITSET_BITS_PER_WORD; }
-  static size_t _S_whichbyte( size_t __pos )
-    { return (__pos % _GLIBCPP_BITSET_BITS_PER_WORD) / CHAR_BIT; }
-  static size_t _S_whichbit( size_t __pos )
-    { return __pos % _GLIBCPP_BITSET_BITS_PER_WORD; }
-  static _WordT _S_maskbit( size_t __pos )
-    { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
-
-  _WordT& _M_getword(size_t __pos)       { return _M_w[_S_whichword(__pos)]; }
-  _WordT  _M_getword(size_t __pos) const { return _M_w[_S_whichword(__pos)]; }
-
-  _WordT& _M_hiword()       { return _M_w[_Nw - 1]; }
-  _WordT  _M_hiword() const { return _M_w[_Nw - 1]; }
-
-  void _M_do_and(const _Base_bitset<_Nw>& __x) {
-    for ( size_t __i = 0; __i < _Nw; __i++ ) {
-      _M_w[__i] &= __x._M_w[__i];
-    }
-  }
-
-  void _M_do_or(const _Base_bitset<_Nw>& __x) {
-    for ( size_t __i = 0; __i < _Nw; __i++ ) {
-      _M_w[__i] |= __x._M_w[__i];
-    }
-  }
-
-  void _M_do_xor(const _Base_bitset<_Nw>& __x) {
-    for ( size_t __i = 0; __i < _Nw; __i++ ) {
-      _M_w[__i] ^= __x._M_w[__i];
-    }
-  }
-
-  void _M_do_left_shift(size_t __shift);
-  void _M_do_right_shift(size_t __shift);
-
-  void _M_do_flip() {
-    for ( size_t __i = 0; __i < _Nw; __i++ ) {
-      _M_w[__i] = ~_M_w[__i];
-    }
-  }
-
-  void _M_do_set() {
-    for ( size_t __i = 0; __i < _Nw; __i++ ) {
-      _M_w[__i] = ~static_cast<_WordT>(0);
-    }
-  }
-
-  void _M_do_reset() { memset(_M_w, 0, _Nw * sizeof(_WordT)); }
-
-  bool _M_is_equal(const _Base_bitset<_Nw>& __x) const {
-    for (size_t __i = 0; __i < _Nw; ++__i) {
-      if (_M_w[__i] != __x._M_w[__i])
-        return false;
-    }
-    return true;
-  }
-
-  bool _M_is_any() const {
-    for ( size_t __i = 0; __i < _Nw; __i++ ) {
-      if ( _M_w[__i] != static_cast<_WordT>(0) )
-        return true;
-    }
-    return false;
-  }
-
-  size_t _M_do_count() const {
-    size_t __result = 0;
-    const unsigned char* __byte_ptr = (const unsigned char*)_M_w;
-    const unsigned char* __end_ptr = (const unsigned char*)(_M_w+_Nw);
-
-    while ( __byte_ptr < __end_ptr ) {
-      __result += _Bit_count<true>::_S_bit_count[*__byte_ptr];
-      __byte_ptr++;
-    }
-    return __result;
-  }
-
-  unsigned long _M_do_to_ulong() const; 
-
-  // find first "on" bit
-  size_t _M_do_find_first(size_t __not_found) const;
-
-  // find the next "on" bit that follows "prev"
-  size_t _M_do_find_next(size_t __prev, size_t __not_found) const;
-};
-
-//
-// Definitions of non-inline functions from _Base_bitset.
-// 
-
-template<size_t _Nw>
-void _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift) 
-{
-  if (__shift != 0) {
-    const size_t __wshift = __shift / _GLIBCPP_BITSET_BITS_PER_WORD;
-    const size_t __offset = __shift % _GLIBCPP_BITSET_BITS_PER_WORD;
-
-    if (__offset == 0)
-      for (size_t __n = _Nw - 1; __n >= __wshift; --__n)
-        _M_w[__n] = _M_w[__n - __wshift];
-
-    else {
-      const size_t __sub_offset = _GLIBCPP_BITSET_BITS_PER_WORD - __offset;
-      for (size_t __n = _Nw - 1; __n > __wshift; --__n)
-        _M_w[__n] = (_M_w[__n - __wshift] << __offset) | 
-                    (_M_w[__n - __wshift - 1] >> __sub_offset);
-      _M_w[__wshift] = _M_w[0] << __offset;
-    }
-
-    fill(_M_w + 0, _M_w + __wshift, static_cast<_WordT>(0));
-  }
-}
-
-template<size_t _Nw>
-void _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift) 
-{
-  if (__shift != 0) {
-    const size_t __wshift = __shift / _GLIBCPP_BITSET_BITS_PER_WORD;
-    const size_t __offset = __shift % _GLIBCPP_BITSET_BITS_PER_WORD;
-    const size_t __limit = _Nw - __wshift - 1;
-
-    if (__offset == 0)
-      for (size_t __n = 0; __n <= __limit; ++__n)
-        _M_w[__n] = _M_w[__n + __wshift];
-
-    else {
-      const size_t __sub_offset = _GLIBCPP_BITSET_BITS_PER_WORD - __offset;
-      for (size_t __n = 0; __n < __limit; ++__n)
-        _M_w[__n] = (_M_w[__n + __wshift] >> __offset) |
-                    (_M_w[__n + __wshift + 1] << __sub_offset);
-      _M_w[__limit] = _M_w[_Nw-1] >> __offset;
-    }
-
-    fill(_M_w + __limit + 1, _M_w + _Nw, static_cast<_WordT>(0));
-  }
-}
-
-template<size_t _Nw>
-unsigned long _Base_bitset<_Nw>::_M_do_to_ulong() const
-{
-  for (size_t __i = 1; __i < _Nw; ++__i) 
-    if (_M_w[__i]) 
-      __throw_overflow_error("bitset");
-  
-  return _M_w[0];
-}
-
-template<size_t _Nw>
-size_t _Base_bitset<_Nw>::_M_do_find_first(size_t __not_found) const 
-{
-  for ( size_t __i = 0; __i < _Nw; __i++ ) {
-    _WordT __thisword = _M_w[__i];
-    if ( __thisword != static_cast<_WordT>(0) ) {
-      // find byte within word
-      for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) {
-        unsigned char __this_byte
-          = static_cast<unsigned char>(__thisword & (~(unsigned char)0));
-        if ( __this_byte )
-          return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT +
-            _First_one<true>::_S_first_one[__this_byte];
-
-        __thisword >>= CHAR_BIT;
-      }
-    }
-  }
-  // not found, so return an indication of failure.
-  return __not_found;
-}
-
-template<size_t _Nw>
-size_t
-_Base_bitset<_Nw>::_M_do_find_next(size_t __prev, size_t __not_found) const
-{
-  // make bound inclusive
-  ++__prev;
-
-  // check out of bounds
-  if ( __prev >= _Nw * _GLIBCPP_BITSET_BITS_PER_WORD )
-    return __not_found;
-
-    // search first word
-  size_t __i = _S_whichword(__prev);
-  _WordT __thisword = _M_w[__i];
-
-    // mask off bits below bound
-  __thisword &= (~static_cast<_WordT>(0)) << _S_whichbit(__prev);
-
-  if ( __thisword != static_cast<_WordT>(0) ) {
-    // find byte within word
-    // get first byte into place
-    __thisword >>= _S_whichbyte(__prev) * CHAR_BIT;
-    for ( size_t __j = _S_whichbyte(__prev); __j < sizeof(_WordT); __j++ ) {
-      unsigned char __this_byte
-        = static_cast<unsigned char>(__thisword & (~(unsigned char)0));
-      if ( __this_byte )
-        return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT +
-          _First_one<true>::_S_first_one[__this_byte];
-
-      __thisword >>= CHAR_BIT;
-    }
-  }
-
-  // check subsequent words
-  __i++;
-  for ( ; __i < _Nw; __i++ ) {
-    __thisword = _M_w[__i];
-    if ( __thisword != static_cast<_WordT>(0) ) {
-      // find byte within word
-      for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) {
-        unsigned char __this_byte
-          = static_cast<unsigned char>(__thisword & (~(unsigned char)0));
-        if ( __this_byte )
-          return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT +
-            _First_one<true>::_S_first_one[__this_byte];
-
-        __thisword >>= CHAR_BIT;
-      }
-    }
-  }
-
-  // not found, so return an indication of failure.
-  return __not_found;
-} // end _M_do_find_next
-
-
-// ------------------------------------------------------------
-
-//
-// Base class: specialization for a single word.
-//
-
-template<> struct _Base_bitset<1> {
-  typedef unsigned long _WordT;
-  _WordT _M_w;
-
-  _Base_bitset( void ) : _M_w(0) {}
-  _Base_bitset(unsigned long __val) : _M_w(__val) {}
-
-  static size_t _S_whichword( size_t __pos )
-    { return __pos / _GLIBCPP_BITSET_BITS_PER_WORD; }
-  static size_t _S_whichbyte( size_t __pos )
-    { return (__pos % _GLIBCPP_BITSET_BITS_PER_WORD) / CHAR_BIT; }
-  static size_t _S_whichbit( size_t __pos )
-    {  return __pos % _GLIBCPP_BITSET_BITS_PER_WORD; }
-  static _WordT _S_maskbit( size_t __pos )
-    { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
-
-  _WordT& _M_getword(size_t)       { return _M_w; }
-  _WordT  _M_getword(size_t) const { return _M_w; }
-
-  _WordT& _M_hiword()       { return _M_w; }
-  _WordT  _M_hiword() const { return _M_w; }
-
-  void _M_do_and(const _Base_bitset<1>& __x) { _M_w &= __x._M_w; }
-  void _M_do_or(const _Base_bitset<1>& __x)  { _M_w |= __x._M_w; }
-  void _M_do_xor(const _Base_bitset<1>& __x) { _M_w ^= __x._M_w; }
-  void _M_do_left_shift(size_t __shift)     { _M_w <<= __shift; }
-  void _M_do_right_shift(size_t __shift)    { _M_w >>= __shift; }
-  void _M_do_flip()                       { _M_w = ~_M_w; }
-  void _M_do_set()                        { _M_w = ~static_cast<_WordT>(0); }
-  void _M_do_reset()                      { _M_w = 0; }
-
-  bool _M_is_equal(const _Base_bitset<1>& __x) const
-    { return _M_w == __x._M_w; }
-  bool _M_is_any() const
-    { return _M_w != 0; }
-
-  size_t _M_do_count() const {
-    size_t __result = 0;
-    const unsigned char* __byte_ptr = (const unsigned char*)&_M_w;
-    const unsigned char* __end_ptr
-      = ((const unsigned char*)&_M_w)+sizeof(_M_w);
-    while ( __byte_ptr < __end_ptr ) {
-      __result += _Bit_count<true>::_S_bit_count[*__byte_ptr];
-      __byte_ptr++;
-    }
-    return __result;
-  }
-
-  unsigned long _M_do_to_ulong() const { return _M_w; }
-
-  size_t _M_do_find_first(size_t __not_found) const;
-
-  // find the next "on" bit that follows "prev"
-  size_t _M_do_find_next(size_t __prev, size_t __not_found) const; 
-
-};
-
-
-// ------------------------------------------------------------
-// Helper class to zero out the unused high-order bits in the highest word.
-
-template <size_t _Extrabits> struct _Sanitize {
-  static void _M_do_sanitize(unsigned long& __val)
-    { __val &= ~((~static_cast<unsigned long>(0)) << _Extrabits); }
-};
-
-template<> struct _Sanitize<0> {
-  static void _M_do_sanitize(unsigned long) {}
-};
-
-
-
-// ------------------------------------------------------------
-// Class bitset.
-//   _Nb may be any nonzero number of type size_t.
-
-template<size_t _Nb>
-class bitset : private _Base_bitset<__BITSET_WORDS(_Nb)>
-{
-private:
-  typedef _Base_bitset<__BITSET_WORDS(_Nb)> _Base;
-  typedef unsigned long _WordT;
-
-private:
-  void _M_do_sanitize() {
-    _Sanitize<_Nb%_GLIBCPP_BITSET_BITS_PER_WORD>::_M_do_sanitize(this->_M_hiword());
-  }
-
-public:
-
-  // bit reference:
-  class reference;
-  friend class reference;
-
-  class reference {
-    friend class bitset;
-
-    _WordT *_M_wp;
-    size_t _M_bpos;
-
-    // left undefined
-    reference();
-
-  public:
-    reference( bitset& __b, size_t __pos ) {
-      _M_wp = &__b._M_getword(__pos);
-      _M_bpos = _Base::_S_whichbit(__pos);
-    }
-
-    ~reference() {}
-
-    // for b[i] = __x;
-    reference& operator=(bool __x) {
-      if ( __x )
-        *_M_wp |= _Base::_S_maskbit(_M_bpos);
-      else
-        *_M_wp &= ~_Base::_S_maskbit(_M_bpos);
-
-      return *this;
-    }
-
-    // for b[i] = b[__j];
-    reference& operator=(const reference& __j) {
-      if ( (*(__j._M_wp) & _Base::_S_maskbit(__j._M_bpos)) )
-        *_M_wp |= _Base::_S_maskbit(_M_bpos);
-      else
-        *_M_wp &= ~_Base::_S_maskbit(_M_bpos);
-
-      return *this;
-    }
-
-    // flips the bit
-    bool operator~() const
-      { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) == 0; }
-
-    // for __x = b[i];
-    operator bool() const
-      { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) != 0; }
-
-    // for b[i].flip();
-    reference& flip() {
-      *_M_wp ^= _Base::_S_maskbit(_M_bpos);
-      return *this;
-    }
-  };
-
-  // 23.3.5.1 constructors:
-  bitset() {}
-  bitset(unsigned long __val) : _Base_bitset<__BITSET_WORDS(_Nb)>(__val) 
-    { _M_do_sanitize(); }
-
-  template<class _CharT, class _Traits, class _Alloc>
-  explicit bitset(const basic_string<_CharT, _Traits, _Alloc>& __s,
-                  size_t __pos = 0)
-    : _Base() 
-  {
-    if (__pos > __s.size()) 
-      __throw_out_of_range("bitset");
-    _M_copy_from_string(__s, __pos,
-                        basic_string<_CharT, _Traits, _Alloc>::npos);
-  }
-  template<class _CharT, class _Traits, class _Alloc>
-  bitset(const basic_string<_CharT, _Traits, _Alloc>& __s,
-         size_t __pos,
-         size_t __n)
-    : _Base() 
-  {
-    if (__pos > __s.size()) 
-      __throw_out_of_range("bitset");
-    _M_copy_from_string(__s, __pos, __n);
-  }
-
-  // 23.3.5.2 bitset operations:
-  bitset<_Nb>& operator&=(const bitset<_Nb>& __rhs) {
-    this->_M_do_and(__rhs);
-    return *this;
-  }
-
-  bitset<_Nb>& operator|=(const bitset<_Nb>& __rhs) {
-    this->_M_do_or(__rhs);
-    return *this;
-  }
-
-  bitset<_Nb>& operator^=(const bitset<_Nb>& __rhs) {
-    this->_M_do_xor(__rhs);
-    return *this;
-  }
-
-  bitset<_Nb>& operator<<=(size_t __pos) {
-    this->_M_do_left_shift(__pos);
-    this->_M_do_sanitize();
-    return *this;
-  }
-
-  bitset<_Nb>& operator>>=(size_t __pos) {
-    this->_M_do_right_shift(__pos);
-    this->_M_do_sanitize();
-    return *this;
-  }
-
-  //
-  // Extension:
-  // Versions of single-bit set, reset, flip, test with no range checking.
-  //
-
-  bitset<_Nb>& _Unchecked_set(size_t __pos) {
-    this->_M_getword(__pos) |= _Base::_S_maskbit(__pos);
-    return *this;
-  }
-
-  bitset<_Nb>& _Unchecked_set(size_t __pos, int __val) {
-    if (__val)
-      this->_M_getword(__pos) |= _Base::_S_maskbit(__pos);
-    else
-      this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos);
-
-    return *this;
-  }
-
-  bitset<_Nb>& _Unchecked_reset(size_t __pos) {
-    this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos);
-    return *this;
-  }
-
-  bitset<_Nb>& _Unchecked_flip(size_t __pos) {
-    this->_M_getword(__pos) ^= _Base::_S_maskbit(__pos);
-    return *this;
-  }
-
-  bool _Unchecked_test(size_t __pos) const {
-    return (this->_M_getword(__pos) & _Base::_S_maskbit(__pos))
-      != static_cast<_WordT>(0);
-  }
-
-  // Set, reset, and flip.
-
-  bitset<_Nb>& set() {
-    this->_M_do_set();
-    this->_M_do_sanitize();
-    return *this;
-  }
-
-  bitset<_Nb>& set(size_t __pos, bool __val = true) {
-    if (__pos >= _Nb)
-      __throw_out_of_range("bitset");
-
-    return _Unchecked_set(__pos, __val);
-  }
-
-  bitset<_Nb>& reset() {
-    this->_M_do_reset();
-    return *this;
-  }
-
-  bitset<_Nb>& reset(size_t __pos) {
-    if (__pos >= _Nb)
-      __throw_out_of_range("bitset");
-
-    return _Unchecked_reset(__pos);
-  }
-
-  bitset<_Nb>& flip() {
-    this->_M_do_flip();
-    this->_M_do_sanitize();
-    return *this;
-  }
-
-  bitset<_Nb>& flip(size_t __pos) {
-    if (__pos >= _Nb)
-      __throw_out_of_range("bitset");
-
-    return _Unchecked_flip(__pos);
-  }
-
-  bitset<_Nb> operator~() const { 
-    return bitset<_Nb>(*this).flip();
-  }
-
-  // element access:
-  //for b[i];
-  // _GLIBCPP_RESOLVE_LIB_DEFECTS Note that this implementation already
-  // resolves DR 11 (items 1 and 2), but does not do the range-checking
-  // required by that DR's resolution.  -pme
-  reference operator[](size_t __pos) { return reference(*this,__pos); }
-  bool operator[](size_t __pos) const { return _Unchecked_test(__pos); }
-
-  unsigned long to_ulong() const { return this->_M_do_to_ulong(); }
-
-  template <class _CharT, class _Traits, class _Alloc>
-  basic_string<_CharT, _Traits, _Alloc> to_string() const {
-    basic_string<_CharT, _Traits, _Alloc> __result;
-    _M_copy_to_string(__result);
-    return __result;
-  }
-
-  // Helper functions for string operations.
-  template<class _CharT, class _Traits, class _Alloc>
-  void _M_copy_from_string(const basic_string<_CharT,_Traits,_Alloc>& __s,
-                          size_t,
-                          size_t);
-
-  template<class _CharT, class _Traits, class _Alloc>
-  void _M_copy_to_string(basic_string<_CharT,_Traits,_Alloc>&) const;
-
-  size_t count() const { return this->_M_do_count(); }
-
-  size_t size() const { return _Nb; }
-
-  bool operator==(const bitset<_Nb>& __rhs) const {
-    return this->_M_is_equal(__rhs);
-  }
-  bool operator!=(const bitset<_Nb>& __rhs) const {
-    return !this->_M_is_equal(__rhs);
-  }
-
-  bool test(size_t __pos) const {
-    if (__pos >= _Nb)
-      __throw_out_of_range("bitset");
-
-    return _Unchecked_test(__pos);
-  }
-
-  bool any() const { return this->_M_is_any(); }
-  bool none() const { return !this->_M_is_any(); }
-
-  bitset<_Nb> operator<<(size_t __pos) const
-    { return bitset<_Nb>(*this) <<= __pos; }
-  bitset<_Nb> operator>>(size_t __pos) const
-    { return bitset<_Nb>(*this) >>= __pos; }
-
-  //
-  // EXTENSIONS: bit-find operations.  These operations are
-  // experimental, and are subject to change or removal in future
-  // versions.
-  // 
-
-  // find the index of the first "on" bit
-  size_t _Find_first() const 
-    { return this->_M_do_find_first(_Nb); }
-
-  // find the index of the next "on" bit after prev
-  size_t _Find_next( size_t __prev ) const 
-    { return this->_M_do_find_next(__prev, _Nb); }
-
-};
-
-//
-// Definitions of non-inline member functions.
-//
-
-template <size_t _Nb>
-template<class _CharT, class _Traits, class _Alloc>
-void bitset<_Nb>
-  ::_M_copy_from_string(const basic_string<_CharT,_Traits,_Alloc>& __s,
-                        size_t __pos,
-                        size_t __n)
-{
-  reset();
-  const size_t __nbits = min(_Nb, min(__n, __s.size() - __pos));
-  for (size_t __i = 0; __i < __nbits; ++__i) {
-    switch(__s[__pos + __nbits - __i - 1]) {
-    case '0':
-      break;
-    case '1':
-      set(__i);
-      break;
-    default:
-      __throw_invalid_argument("bitset");
-    }
-  }
-}
-
-template <size_t _Nb>
-template <class _CharT, class _Traits, class _Alloc>
-void bitset<_Nb>
-  ::_M_copy_to_string(basic_string<_CharT, _Traits, _Alloc>& __s) const
-{
-  __s.assign(_Nb, '0');
-  
-  for (size_t __i = 0; __i < _Nb; ++__i) 
-    if (_Unchecked_test(__i))
-      __s[_Nb - 1 - __i] = '1';
-}
-
-// ------------------------------------------------------------
-
-//
-// 23.3.5.3 bitset operations:
-//
-
-template <size_t _Nb>
-inline bitset<_Nb> operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) {
-  bitset<_Nb> __result(__x);
-  __result &= __y;
-  return __result;
-}
-
-
-template <size_t _Nb>
-inline bitset<_Nb> operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y) {
-  bitset<_Nb> __result(__x);
-  __result |= __y;
-  return __result;
-}
-
-template <size_t _Nb>
-inline bitset<_Nb> operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) {
-  bitset<_Nb> __result(__x);
-  __result ^= __y;
-  return __result;
-}
-
-template <class _CharT, class _Traits, size_t _Nb>
-basic_istream<_CharT, _Traits>&
-operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
-{
-  typedef typename _Traits::char_type char_type;
-  basic_string<_CharT, _Traits> __tmp;
-  __tmp.reserve(_Nb);
-
-  // Skip whitespace
-  typename basic_istream<_CharT, _Traits>::sentry __sentry(__is);
-  if (__sentry) {
-    basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
-    for (size_t __i = 0; __i < _Nb; ++__i) {
-      static typename _Traits::int_type __eof = _Traits::eof();
-
-      typename _Traits::int_type __c1 = __buf->sbumpc();
-      if (_Traits::eq_int_type(__c1, __eof)) {
-        __is.setstate(ios_base::eofbit);
-        break;
-      }
-      else {
-        char_type __c2 = _Traits::to_char_type(__c1);
-        char_type __c  = __is.narrow(__c2, '*');
-
-        if (__c == '0' || __c == '1')
-          __tmp.push_back(__c);
-        else if (_Traits::eq_int_type(__buf->sputbackc(__c2), __eof)) {
-          __is.setstate(ios_base::failbit);
-          break;
-        }
-      }
-    }
-
-    if (__tmp.empty())
-      __is.setstate(ios_base::failbit);
-    else
-      __x._M_copy_from_string(__tmp, static_cast<size_t>(0), _Nb);
-  }
-
-  return __is;
-}
-
-template <class _CharT, class _Traits, size_t _Nb>
-basic_ostream<_CharT, _Traits>&
-operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Nb>& __x)
-{
-  basic_string<_CharT, _Traits> __tmp;
-  __x._M_copy_to_string(__tmp);
-  return __os << __tmp;
-}
-
-} // namespace std
-
-#undef __BITSET_WORDS
-
-#endif /* __GLIBCPP_BITSET */
-
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex
deleted file mode 100644 (file)
index 18dd867..0000000
+++ /dev/null
@@ -1,1058 +0,0 @@
-// The template and inlines for the -*- C++ -*- complex number classes.
-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-//
-// ISO C++ 14882: 26.2  Complex Numbers
-// Note: this is not a conforming implementation.
-// Initially implemented by Ulrich Drepper <drepper@cygnus.com>
-// Improved by Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
-//
-
-/** @file std_complex.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_COMPLEX
-#define _CPP_COMPLEX   1
-
-#pragma GCC system_header
-
-#include <bits/c++config.h>
-#include <bits/cpp_type_traits.h>
-#include <cmath>
-#include <sstream>
-
-namespace std
-{
-  // Forward declarations
-  template<typename _Tp> class complex;
-  template<> class complex<float>;
-  template<> class complex<double>;
-  template<> class complex<long double>;
-
-  template<typename _Tp> _Tp abs(const complex<_Tp>&);
-  template<typename _Tp> _Tp arg(const complex<_Tp>&);
-  template<typename _Tp> _Tp norm(const complex<_Tp>&);
-
-  template<typename _Tp> complex<_Tp> conj(const complex<_Tp>&);
-  template<typename _Tp> complex<_Tp> polar(const _Tp&, const _Tp& = 0);
-
-  // Transcendentals:
-  template<typename _Tp> complex<_Tp> cos(const complex<_Tp>&);
-  template<typename _Tp> complex<_Tp> cosh(const complex<_Tp>&);
-  template<typename _Tp> complex<_Tp> exp(const complex<_Tp>&);
-  template<typename _Tp> complex<_Tp> log(const complex<_Tp>&);
-  template<typename _Tp> complex<_Tp> log10(const complex<_Tp>&);
-  template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, int);
-  template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, const _Tp&);
-  template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, 
-                                          const complex<_Tp>&);
-  template<typename _Tp> complex<_Tp> pow(const _Tp&, const complex<_Tp>&);
-  template<typename _Tp> complex<_Tp> sin(const complex<_Tp>&);
-  template<typename _Tp> complex<_Tp> sinh(const complex<_Tp>&);
-  template<typename _Tp> complex<_Tp> sqrt(const complex<_Tp>&);
-  template<typename _Tp> complex<_Tp> tan(const complex<_Tp>&);
-  template<typename _Tp> complex<_Tp> tanh(const complex<_Tp>&);
-    
-    
-  // 26.2.2  Primary template class complex
-  template<typename _Tp>
-    class complex
-    {
-    public:
-      typedef _Tp value_type;
-      
-      complex(const _Tp& = _Tp(), const _Tp & = _Tp());
-
-      // Let's the compiler synthetize the copy constructor   
-      // complex (const complex<_Tp>&);
-      template<typename _Up>
-        complex(const complex<_Up>&);
-        
-      _Tp real() const;
-      _Tp imag() const;
-
-      complex<_Tp>& operator=(const _Tp&);
-      complex<_Tp>& operator+=(const _Tp&);
-      complex<_Tp>& operator-=(const _Tp&);
-      complex<_Tp>& operator*=(const _Tp&);
-      complex<_Tp>& operator/=(const _Tp&);
-
-      // Let's the compiler synthetize the
-      // copy and assignment operator
-      // complex<_Tp>& operator= (const complex<_Tp>&);
-      template<typename _Up>
-        complex<_Tp>& operator=(const complex<_Up>&);
-      template<typename _Up>
-        complex<_Tp>& operator+=(const complex<_Up>&);
-      template<typename _Up>
-        complex<_Tp>& operator-=(const complex<_Up>&);
-      template<typename _Up>
-        complex<_Tp>& operator*=(const complex<_Up>&);
-      template<typename _Up>
-        complex<_Tp>& operator/=(const complex<_Up>&);
-
-    private:
-      _Tp _M_real, _M_imag;
-    };
-
-  template<typename _Tp>
-    inline _Tp
-    complex<_Tp>::real() const { return _M_real; }
-
-  template<typename _Tp>
-    inline _Tp
-    complex<_Tp>::imag() const { return _M_imag; }
-
-  template<typename _Tp>
-    inline 
-    complex<_Tp>::complex(const _Tp& __r, const _Tp& __i)
-    : _M_real(__r), _M_imag(__i) { }
-
-  template<typename _Tp>
-    template<typename _Up>
-    inline 
-    complex<_Tp>::complex(const complex<_Up>& __z)
-    : _M_real(__z.real()), _M_imag(__z.imag()) { }
-        
-  template<typename _Tp>
-    complex<_Tp>&
-    complex<_Tp>::operator=(const _Tp& __t)
-    {
-     _M_real = __t;
-     _M_imag = _Tp();
-     return *this;
-    } 
-
-  // 26.2.5/1
-  template<typename _Tp>
-    inline complex<_Tp>&
-    complex<_Tp>::operator+=(const _Tp& __t)
-    {
-      _M_real += __t;
-      return *this;
-    }
-
-  // 26.2.5/3
-  template<typename _Tp>
-    inline complex<_Tp>&
-    complex<_Tp>::operator-=(const _Tp& __t)
-    {
-      _M_real -= __t;
-      return *this;
-    }
-
-  // 26.2.5/5
-  template<typename _Tp>
-    complex<_Tp>&
-    complex<_Tp>::operator*=(const _Tp& __t)
-    {
-      _M_real *= __t;
-      _M_imag *= __t;
-      return *this;
-    }
-
-  // 26.2.5/7
-  template<typename _Tp>
-    complex<_Tp>&
-    complex<_Tp>::operator/=(const _Tp& __t)
-    {
-      _M_real /= __t;
-      _M_imag /= __t;
-      return *this;
-    }
-
-  template<typename _Tp>
-    template<typename _Up>
-    complex<_Tp>&
-    complex<_Tp>::operator=(const complex<_Up>& __z)
-    {
-      _M_real = __z.real();
-      _M_imag = __z.imag();
-      return *this;
-    }
-
-  // 26.2.5/9
-  template<typename _Tp>
-    template<typename _Up>
-    complex<_Tp>&
-    complex<_Tp>::operator+=(const complex<_Up>& __z)
-    {
-      _M_real += __z.real();
-      _M_imag += __z.imag();
-      return *this;
-    }
-
-  // 26.2.5/11
-  template<typename _Tp>
-    template<typename _Up>
-    complex<_Tp>&
-    complex<_Tp>::operator-=(const complex<_Up>& __z)
-    {
-      _M_real -= __z.real();
-      _M_imag -= __z.imag();
-      return *this;
-    }
-
-  // 26.2.5/13
-  // XXX: This is a grammar school implementation.
-  template<typename _Tp>
-    template<typename _Up>
-    complex<_Tp>&
-    complex<_Tp>::operator*=(const complex<_Up>& __z)
-    {
-      const _Tp __r = _M_real * __z.real() - _M_imag * __z.imag();
-      _M_imag = _M_real * __z.imag() + _M_imag * __z.real();
-      _M_real = __r;
-      return *this;
-    }
-
-  // 26.2.5/15
-  // XXX: This is a grammar school implementation.
-  template<typename _Tp>
-    template<typename _Up>
-    complex<_Tp>&
-    complex<_Tp>::operator/=(const complex<_Up>& __z)
-    {
-      const _Tp __r =  _M_real * __z.real() + _M_imag * __z.imag();
-      const _Tp __n = norm(__z);
-      _M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n;
-      _M_real = __r / __n;
-      return *this;
-    }
-    
-  // Operators:
-  template<typename _Tp>
-    inline complex<_Tp>
-    operator+(const complex<_Tp>& __x, const complex<_Tp>& __y)
-    { return complex<_Tp> (__x) += __y; }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    operator+(const complex<_Tp>& __x, const _Tp& __y)
-    { return complex<_Tp> (__x) += __y; }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    operator+(const _Tp& __x, const complex<_Tp>& __y)
-    { return complex<_Tp> (__y) += __x; }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
-    { return complex<_Tp> (__x) -= __y; }
-    
-  template<typename _Tp>
-    inline complex<_Tp>
-    operator-(const complex<_Tp>& __x, const _Tp& __y)
-    { return complex<_Tp> (__x) -= __y; }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    operator-(const _Tp& __x, const complex<_Tp>& __y)
-    { return complex<_Tp> (__x) -= __y; }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    operator*(const complex<_Tp>& __x, const complex<_Tp>& __y)
-    { return complex<_Tp> (__x) *= __y; }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    operator*(const complex<_Tp>& __x, const _Tp& __y)
-    { return complex<_Tp> (__x) *= __y; }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    operator*(const _Tp& __x, const complex<_Tp>& __y)
-    { return complex<_Tp> (__y) *= __x; }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    operator/(const complex<_Tp>& __x, const complex<_Tp>& __y)
-    { return complex<_Tp> (__x) /= __y; }
-    
-  template<typename _Tp>
-    inline complex<_Tp>
-    operator/(const complex<_Tp>& __x, const _Tp& __y)
-    { return complex<_Tp> (__x) /= __y; }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    operator/(const _Tp& __x, const complex<_Tp>& __y)
-    { return complex<_Tp> (__x) /= __y; }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    operator+(const complex<_Tp>& __x)
-    { return __x; }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    operator-(const complex<_Tp>& __x)
-    {  return complex<_Tp>(-__x.real(), -__x.imag()); }
-
-  template<typename _Tp>
-    inline bool
-    operator==(const complex<_Tp>& __x, const complex<_Tp>& __y)
-    { return __x.real() == __y.real() && __x.imag() == __y.imag(); }
-
-  template<typename _Tp>
-    inline bool
-    operator==(const complex<_Tp>& __x, const _Tp& __y)
-    { return __x.real() == __y && __x.imag() == _Tp(); }
-
-  template<typename _Tp>
-    inline bool
-    operator==(const _Tp& __x, const complex<_Tp>& __y)
-    { return __x == __y.real() && _Tp() == __y.imag(); }
-
-  template<typename _Tp>
-    inline bool
-    operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y)
-    { return __x.real() != __y.real() || __x.imag() != __y.imag(); }
-
-  template<typename _Tp>
-    inline bool
-    operator!=(const complex<_Tp>& __x, const _Tp& __y)
-    { return __x.real() != __y || __x.imag() != _Tp(); }
-
-  template<typename _Tp>
-    inline bool
-    operator!=(const _Tp& __x, const complex<_Tp>& __y)
-    { return __x != __y.real() || _Tp() != __y.imag(); }
-
-  template<typename _Tp, typename _CharT, class _Traits>
-    basic_istream<_CharT, _Traits>&
-    operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
-    {
-      _Tp __re_x, __im_x;
-      _CharT __ch;
-      __is >> __ch;
-      if (__ch == '(') 
-       {
-         __is >> __re_x >> __ch;
-         if (__ch == ',') 
-           {
-             __is >> __im_x >> __ch;
-             if (__ch == ')') 
-               __x = complex<_Tp>(__re_x, __im_x);
-             else
-               __is.setstate(ios_base::failbit);
-           }
-         else if (__ch == ')') 
-           __x = complex<_Tp>(__re_x, _Tp(0));
-         else
-           __is.setstate(ios_base::failbit);
-       }
-      else 
-       {
-         __is.putback(__ch);
-         __is >> __re_x;
-         __x = complex<_Tp>(__re_x, _Tp(0));
-       }
-      return __is;
-    }
-
-  template<typename _Tp, typename _CharT, class _Traits>
-    basic_ostream<_CharT, _Traits>&
-    operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
-    {
-      basic_ostringstream<_CharT, _Traits> __s;
-      __s.flags(__os.flags());
-      __s.imbue(__os.getloc());
-      __s.precision(__os.precision());
-      __s << '(' << __x.real() << "," << __x.imag() << ')';
-      return __os << __s.str();
-    }
-
-  // Values
-  template<typename _Tp>
-    inline _Tp
-    real(const complex<_Tp>& __z)
-    { return __z.real(); }
-    
-  template<typename _Tp>
-    inline _Tp
-    imag(const complex<_Tp>& __z)
-    { return __z.imag(); }
-
-  template<typename _Tp>
-    inline _Tp
-    abs(const complex<_Tp>& __z)
-    {
-      _Tp __x = __z.real();
-      _Tp __y = __z.imag();
-      const _Tp __s = max(abs(__x), abs(__y));
-      if (__s == _Tp())  // well ...
-        return __s;
-      __x /= __s; 
-      __y /= __s;
-      return __s * sqrt(__x * __x + __y * __y);
-    }
-
-  template<typename _Tp>
-    inline _Tp
-    arg(const complex<_Tp>& __z)
-    { return atan2(__z.imag(), __z.real()); }
-
-  // 26.2.7/5: norm(__z) returns the squared magintude of __z.
-  //     As defined, norm() is -not- a norm is the common mathematical
-  //     sens used in numerics.  The helper class _Norm_helper<> tries to
-  //     distinguish between builtin floating point and the rest, so as
-  //     to deliver an answer as close as possible to the real value.
-  template<bool>
-    struct _Norm_helper
-    {
-      template<typename _Tp>
-        static inline _Tp _S_do_it(const complex<_Tp>& __z)
-        {
-          const _Tp __x = __z.real();
-          const _Tp __y = __z.imag();
-          return __x * __x + __y * __y;
-        }
-    };
-
-  template<>
-    struct _Norm_helper<true>
-    {
-      template<typename _Tp>
-        static inline _Tp _S_do_it(const complex<_Tp>& __z)
-        {
-          _Tp __res = abs(__z);
-          return __res * __res;
-        }
-    };
-  
-  template<typename _Tp>
-    inline _Tp
-    norm(const complex<_Tp>& __z)
-    {
-      return _Norm_helper<__is_floating<_Tp>::_M_type>::_S_do_it(__z);
-    }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    polar(const _Tp& __rho, const _Tp& __theta)
-    { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    conj(const complex<_Tp>& __z)
-    { return complex<_Tp>(__z.real(), -__z.imag()); }
-  
-  // Transcendentals
-  template<typename _Tp>
-    inline complex<_Tp>
-    cos(const complex<_Tp>& __z)
-    {
-      const _Tp __x = __z.real();
-      const _Tp __y = __z.imag();
-      return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y));
-    }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    cosh(const complex<_Tp>& __z)
-    {
-      const _Tp __x = __z.real();
-      const _Tp __y = __z.imag();
-      return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y));
-    }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    exp(const complex<_Tp>& __z)
-    { return polar(exp(__z.real()), __z.imag()); }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    log(const complex<_Tp>& __z)
-    { return complex<_Tp>(log(abs(__z)), arg(__z)); }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    log10(const complex<_Tp>& __z)
-    { return log(__z) / log(_Tp(10.0)); }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    sin(const complex<_Tp>& __z)
-    {
-      const _Tp __x = __z.real();
-      const _Tp __y = __z.imag();
-      return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y)); 
-    }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    sinh(const complex<_Tp>& __z)
-    {
-      const _Tp __x = __z.real();
-      const _Tp  __y = __z.imag();
-      return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y));
-    }
-
-  template<typename _Tp>
-    complex<_Tp>
-    sqrt(const complex<_Tp>& __z)
-    {
-      _Tp __x = __z.real();
-      _Tp __y = __z.imag();
-
-      if (__x == _Tp())
-        {
-          _Tp __t = sqrt(abs(__y) / 2);
-          return complex<_Tp>(__t, __y < _Tp() ? -__t : __t);
-        }
-      else
-        {
-          _Tp __t = sqrt(2 * (abs(__z) + abs(__x)));
-          _Tp __u = __t / 2;
-          return __x > _Tp()
-            ? complex<_Tp>(__u, __y / __t)
-            : complex<_Tp>(abs(__y) / __t, __y < _Tp() ? -__u : __u);
-        }
-    }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    tan(const complex<_Tp>& __z)
-    {
-      return sin(__z) / cos(__z);
-    }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    tanh(const complex<_Tp>& __z)
-    {
-      return sinh(__z) / cosh(__z);
-    }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    pow(const complex<_Tp>& __z, int __n)
-    {
-      return __pow_helper(__z, __n);
-    }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    pow(const complex<_Tp>& __x, const _Tp& __y)
-    {
-      return exp(__y * log(__x));
-    }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
-    {
-      return exp(__y * log(__x));
-    }
-
-  template<typename _Tp>
-    inline complex<_Tp>
-    pow(const _Tp& __x, const complex<_Tp>& __y)
-    {
-      return exp(__y * log(__x));
-    }
-
-  // 26.2.3  complex specializations
-  // complex<float> specialization
-  template<> class complex<float>
-  {
-  public:
-    typedef float value_type;
-    
-    complex(float = 0.0f, float = 0.0f);
-#ifdef _GLIBCPP_BUGGY_COMPLEX
-    complex(const complex& __z) : _M_value(__z._M_value) { }
-#endif
-    explicit complex(const complex<double>&);
-    explicit complex(const complex<long double>&);
-
-    float real() const;
-    float imag() const;
-
-    complex<float>& operator=(float);
-    complex<float>& operator+=(float);
-    complex<float>& operator-=(float);
-    complex<float>& operator*=(float);
-    complex<float>& operator/=(float);
-        
-    // Let's the compiler synthetize the copy and assignment
-    // operator.  It always does a pretty good job.
-    // complex& operator= (const complex&);
-    template<typename _Tp>
-      complex<float>&operator=(const complex<_Tp>&);
-    template<typename _Tp>
-      complex<float>& operator+=(const complex<_Tp>&);
-    template<class _Tp>
-      complex<float>& operator-=(const complex<_Tp>&);
-    template<class _Tp>
-      complex<float>& operator*=(const complex<_Tp>&);
-    template<class _Tp>
-      complex<float>&operator/=(const complex<_Tp>&);
-
-  private:
-    typedef __complex__ float _ComplexT;
-    _ComplexT _M_value;
-
-    complex(_ComplexT __z) : _M_value(__z) { }
-        
-    friend class complex<double>;
-    friend class complex<long double>;
-  };
-
-  inline float
-  complex<float>::real() const
-  { return __real__ _M_value; }
-
-  inline float
-  complex<float>::imag() const
-  { return __imag__ _M_value; }
-
-  inline
-  complex<float>::complex(float r, float i)
-  {
-    __real__ _M_value = r;
-    __imag__ _M_value = i;
-  }
-
-  inline complex<float>&
-  complex<float>::operator=(float __f)
-  {
-    __real__ _M_value = __f;
-    __imag__ _M_value = 0.0f;
-    return *this;
-  }
-
-  inline complex<float>&
-  complex<float>::operator+=(float __f)
-  {
-    __real__ _M_value += __f;
-    return *this;
-  }
-
-  inline complex<float>&
-  complex<float>::operator-=(float __f)
-  {
-    __real__ _M_value -= __f;
-    return *this;
-  }
-
-  inline complex<float>&
-  complex<float>::operator*=(float __f)
-  {
-    _M_value *= __f;
-    return *this;
-  }
-
-  inline complex<float>&
-  complex<float>::operator/=(float __f)
-  {
-    _M_value /= __f;
-    return *this;
-  }
-
-  template<typename _Tp>
-  inline complex<float>&
-  complex<float>::operator=(const complex<_Tp>& __z)
-  {
-    __real__ _M_value = __z.real();
-    __imag__ _M_value = __z.imag();
-    return *this;
-  }
-
-  template<typename _Tp>
-  inline complex<float>&
-  complex<float>::operator+=(const complex<_Tp>& __z)
-  {
-    __real__ _M_value += __z.real();
-    __imag__ _M_value += __z.imag();
-    return *this;
-  }
-    
-  template<typename _Tp>
-    inline complex<float>&
-    complex<float>::operator-=(const complex<_Tp>& __z)
-    {
-     __real__ _M_value -= __z.real();
-     __imag__ _M_value -= __z.imag();
-     return *this;
-    } 
-
-  template<typename _Tp>
-    inline complex<float>&
-    complex<float>::operator*=(const complex<_Tp>& __z)
-    {
-      _ComplexT __t;
-      __real__ __t = __z.real();
-      __imag__ __t = __z.imag();
-      _M_value *= __t;
-      return *this;
-    }
-
-  template<typename _Tp>
-    inline complex<float>&
-    complex<float>::operator/=(const complex<_Tp>& __z)
-    {
-      _ComplexT __t;
-      __real__ __t = __z.real();
-      __imag__ __t = __z.imag();
-      _M_value /= __t;
-      return *this;
-    }
-
-  // 26.2.3  complex specializations
-  // complex<double> specialization
-  template<> class complex<double>
-  {
-  public:
-    typedef double value_type;
-
-    complex(double  =0.0, double =0.0);
-#ifdef _GLIBCPP_BUGGY_COMPLEX
-    complex(const complex& __z) : _M_value(__z._M_value) { }
-#endif
-    complex(const complex<float>&);
-    explicit complex(const complex<long double>&);
-        
-    double real() const;
-    double imag() const;
-        
-    complex<double>& operator=(double);
-    complex<double>& operator+=(double);
-    complex<double>& operator-=(double);
-    complex<double>& operator*=(double);
-    complex<double>& operator/=(double);
-
-    // The compiler will synthetize this, efficiently.
-    // complex& operator= (const complex&);
-    template<typename _Tp>
-      complex<double>& operator=(const complex<_Tp>&);
-    template<typename _Tp>
-      complex<double>& operator+=(const complex<_Tp>&);
-    template<typename _Tp>
-      complex<double>& operator-=(const complex<_Tp>&);
-    template<typename _Tp>
-      complex<double>& operator*=(const complex<_Tp>&);
-    template<typename _Tp>
-      complex<double>& operator/=(const complex<_Tp>&);
-
-  private:
-    typedef __complex__ double _ComplexT;
-    _ComplexT _M_value;
-
-    complex(_ComplexT __z) : _M_value(__z) { }
-        
-    friend class complex<float>;
-    friend class complex<long double>;
-  };
-
-  inline double
-  complex<double>::real() const
-  { return __real__ _M_value; }
-
-  inline double
-  complex<double>::imag() const
-  { return __imag__ _M_value; }
-
-  inline
-  complex<double>::complex(double __r, double __i)
-  {
-    __real__ _M_value = __r;
-    __imag__ _M_value = __i;
-  }
-
-  inline complex<double>&
-  complex<double>::operator=(double __d)
-  {
-    __real__ _M_value = __d;
-    __imag__ _M_value = 0.0;
-    return *this;
-  }
-
-  inline complex<double>&
-  complex<double>::operator+=(double __d)
-  {
-    __real__ _M_value += __d;
-    return *this;
-  }
-
-  inline complex<double>&
-  complex<double>::operator-=(double __d)
-  {
-    __real__ _M_value -= __d;
-    return *this;
-  }
-
-  inline complex<double>&
-  complex<double>::operator*=(double __d)
-  {
-    _M_value *= __d;
-    return *this;
-  }
-
-  inline complex<double>&
-  complex<double>::operator/=(double __d)
-  {
-    _M_value /= __d;
-    return *this;
-  }
-
-  template<typename _Tp>
-    inline complex<double>&
-    complex<double>::operator=(const complex<_Tp>& __z)
-    {
-      __real__ _M_value = __z.real();
-      __imag__ _M_value = __z.imag();
-      return *this;
-    }
-    
-  template<typename _Tp>
-    inline complex<double>&
-    complex<double>::operator+=(const complex<_Tp>& __z)
-    {
-      __real__ _M_value += __z.real();
-      __imag__ _M_value += __z.imag();
-      return *this;
-    }
-
-  template<typename _Tp>
-    inline complex<double>&
-    complex<double>::operator-=(const complex<_Tp>& __z)
-    {
-      __real__ _M_value -= __z.real();
-      __imag__ _M_value -= __z.imag();
-      return *this;
-    }
-
-  template<typename _Tp>
-    inline complex<double>&
-    complex<double>::operator*=(const complex<_Tp>& __z)
-    {
-      _ComplexT __t;
-      __real__ __t = __z.real();
-      __imag__ __t = __z.imag();
-      _M_value *= __t;
-      return *this;
-    }
-
-  template<typename _Tp>
-    inline complex<double>&
-    complex<double>::operator/=(const complex<_Tp>& __z)
-    {
-      _ComplexT __t;
-      __real__ __t = __z.real();
-      __imag__ __t = __z.imag();
-      _M_value /= __t;
-      return *this;
-    }
-
-  // 26.2.3  complex specializations
-  // complex<long double> specialization
-  template<> class complex<long double>
-  {
-  public:
-    typedef long double value_type;
-
-    complex(long double = 0.0L, long double = 0.0L);
-#ifdef _GLIBCPP_BUGGY_COMPLEX
-    complex(const complex& __z) : _M_value(__z._M_value) { }
-#endif
-    complex(const complex<float>&);
-    complex(const complex<double>&);
-
-    long double real() const;
-    long double imag() const;
-
-    complex<long double>& operator= (long double);
-    complex<long double>& operator+= (long double);
-    complex<long double>& operator-= (long double);
-    complex<long double>& operator*= (long double);
-    complex<long double>& operator/= (long double);
-
-    // The compiler knows how to do this efficiently
-    // complex& operator= (const complex&);
-    template<typename _Tp>
-      complex<long double>& operator=(const complex<_Tp>&);
-    template<typename _Tp>
-      complex<long double>& operator+=(const complex<_Tp>&);
-    template<typename _Tp>
-      complex<long double>& operator-=(const complex<_Tp>&);
-    template<typename _Tp>
-      complex<long double>& operator*=(const complex<_Tp>&);
-    template<typename _Tp>
-      complex<long double>& operator/=(const complex<_Tp>&);
-
-  private:
-    typedef __complex__ long double _ComplexT;
-    _ComplexT _M_value;
-
-    complex(_ComplexT __z) : _M_value(__z) { }
-
-    friend class complex<float>;
-    friend class complex<double>;
-  };
-
-  inline
-  complex<long double>::complex(long double __r, long double __i)
-  {
-    __real__ _M_value = __r;
-    __imag__ _M_value = __i;
-  }
-
-  inline long double
-  complex<long double>::real() const
-  { return __real__ _M_value; }
-
-  inline long double
-  complex<long double>::imag() const
-  { return __imag__ _M_value; }
-
-  inline complex<long double>&   
-  complex<long double>::operator=(long double __r)
-  {
-    __real__ _M_value = __r;
-    __imag__ _M_value = 0.0L;
-    return *this;
-  }
-
-  inline complex<long double>&
-  complex<long double>::operator+=(long double __r)
-  {
-    __real__ _M_value += __r;
-    return *this;
-  }
-
-  inline complex<long double>&
-  complex<long double>::operator-=(long double __r)
-  {
-    __real__ _M_value -= __r;
-    return *this;
-  }
-
-  inline complex<long double>&
-  complex<long double>::operator*=(long double __r)
-  {
-    _M_value *= __r;
-    return *this;
-  }
-
-  inline complex<long double>&
-  complex<long double>::operator/=(long double __r)
-  {
-    _M_value /= __r;
-    return *this;
-  }
-
-  template<typename _Tp>
-    inline complex<long double>&
-    complex<long double>::operator=(const complex<_Tp>& __z)
-    {
-      __real__ _M_value = __z.real();
-      __imag__ _M_value = __z.imag();
-      return *this;
-    }
-
-  template<typename _Tp>
-    inline complex<long double>&
-    complex<long double>::operator+=(const complex<_Tp>& __z)
-    {
-      __real__ _M_value += __z.real();
-      __imag__ _M_value += __z.imag();
-      return *this;
-    }
-
-  template<typename _Tp>
-    inline complex<long double>&
-    complex<long double>::operator-=(const complex<_Tp>& __z)
-    {
-      __real__ _M_value -= __z.real();
-      __imag__ _M_value -= __z.imag();
-      return *this;
-    }
-    
-  template<typename _Tp>
-    inline complex<long double>&
-    complex<long double>::operator*=(const complex<_Tp>& __z)
-    {
-      _ComplexT __t;
-      __real__ __t = __z.real();
-      __imag__ __t = __z.imag();
-      _M_value *= __t;
-      return *this;
-    }
-
-  template<typename _Tp>
-    inline complex<long double>&
-    complex<long double>::operator/=(const complex<_Tp>& __z)
-    {
-      _ComplexT __t;
-      __real__ __t = __z.real();
-      __imag__ __t = __z.imag();
-      _M_value /= __t;
-      return *this;
-    }
-
-  // These bits have to be at the end of this file, so that the
-  // specializations have all been defined.
-  // ??? No, they have to be there because of compiler limitation at
-  // inlining.  It suffices that class specializations be defined.
-  inline
-  complex<float>::complex(const complex<double>& __z)
-  : _M_value(_ComplexT(__z._M_value)) { }
-
-  inline
-  complex<float>::complex(const complex<long double>& __z)
-  : _M_value(_ComplexT(__z._M_value)) { }
-
-  inline
-  complex<double>::complex(const complex<float>& __z) 
-  : _M_value(_ComplexT(__z._M_value)) { }
-
-  inline
-  complex<double>::complex(const complex<long double>& __z)
-  {
-    __real__ _M_value = __z.real();
-    __imag__ _M_value = __z.imag();
-  }
-
-  inline
-  complex<long double>::complex(const complex<float>& __z)
-  : _M_value(_ComplexT(__z._M_value)) { }
-
-  inline
-  complex<long double>::complex(const complex<double>& __z)
-  : _M_value(_ComplexT(__z._M_value)) { }
-} // namespace std
-
-#endif /* _CPP_COMPLEX */
diff --git a/libstdc++-v3/include/std/deque b/libstdc++-v3/include/std/deque
deleted file mode 100644 (file)
index 394eef3..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-// <deque> -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-/** @file std_deque.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_DEQUE
-#define _CPP_DEQUE 1
-
-#pragma GCC system_header
-
-#include <bits/functexcept.h>
-#include <bits/stl_algobase.h>
-#include <bits/stl_alloc.h>
-#include <bits/stl_construct.h>
-#include <bits/stl_uninitialized.h>
-#include <bits/stl_deque.h>
-
-#endif /* _CPP_DEQUE */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/libstdc++-v3/include/std/fstream b/libstdc++-v3/include/std/fstream
deleted file mode 100644 (file)
index a04ddf0..0000000
+++ /dev/null
@@ -1,433 +0,0 @@
-// File based streams -*- C++ -*-
-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-//
-// ISO C++ 14882: 27.8  File-based streams
-//
-
-/** @file std_fstream.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_FSTREAM
-#define _CPP_FSTREAM   1
-
-#pragma GCC system_header
-
-#include <istream>
-#include <ostream>
-#include <bits/basic_file.h>
-#include <locale>      // For codecvt
-#include <bits/gthr.h>
-
-namespace std 
-{
-  template<typename _CharT, typename _Traits>
-    class basic_filebuf : public basic_streambuf<_CharT, _Traits>
-    {
-    public:
-      // Types:
-      typedef _CharT                                   char_type;
-      typedef _Traits                                  traits_type;
-      typedef typename traits_type::int_type           int_type;
-      typedef typename traits_type::pos_type           pos_type;
-      typedef typename traits_type::off_type           off_type;
-      
-      // Non-standard Types:
-      typedef basic_streambuf<char_type, traits_type>          __streambuf_type;
-      typedef basic_filebuf<char_type, traits_type>     __filebuf_type;
-      typedef __basic_file<char_type>                  __file_type;
-      typedef typename traits_type::state_type          __state_type;
-      typedef codecvt<char_type, char, __state_type>    __codecvt_type;
-      typedef typename __codecvt_type::result          __res_type;
-      typedef ctype<char_type>                          __ctype_type;
-
-      friend class ios_base; // For sync_with_stdio.
-
-    private:
-      // Data Members:
-      // External buffer.
-      __file_type*             _M_file;
-
-      // Current and beginning state type for codecvt.
-      __state_type             _M_state_cur;
-      __state_type             _M_state_beg;   
-
-      // MT lock inherited from libio or other low-level io library.
-      __c_lock                 _M_lock;
-
-      // Set iff _M_buf is allocated memory from _M_allocate_internal_buffer..
-      bool                     _M_buf_allocated;
-
-      // XXX Needed? 
-      bool                     _M_last_overflowed;  
-  
-    public:
-      // Constructors/destructor:
-      basic_filebuf();
-
-      // Non-standard ctor:
-      basic_filebuf(__c_file_type* __f, ios_base::openmode __mode, 
-                   int_type __s = static_cast<int_type>(BUFSIZ));
-      // Non-standard member:
-      int
-      fd();
-
-      virtual 
-      ~basic_filebuf() 
-      { 
-       this->close();
-       _M_last_overflowed = false;
-      }
-
-      // Members:
-      bool 
-      is_open(void) const { return _M_file ? _M_file->is_open() : false; }
-    
-      __filebuf_type* 
-      open(const char* __s, ios_base::openmode __mode);
-    
-      __filebuf_type* 
-      close(void);
-
-    protected:
-      void 
-      _M_allocate_internal_buffer();
-
-      void 
-      _M_destroy_internal_buffer();
-
-      void 
-      _M_allocate_pback_buffer();
-
-      // Create __file_type object and initialize it properly.
-      void
-      _M_allocate_file();
-
-      // Overridden virtual functions:
-      virtual streamsize 
-      showmanyc(void);
-   
-      // Stroustrup, 1998, p. 628 
-      // underflow() and uflow() functions are called to get the next
-      // charater from the real input source when the buffer is empty.
-      // Buffered input uses underflow()
-      virtual int_type 
-      underflow(void);
-
-      virtual int_type 
-      pbackfail(int_type __c = _Traits::eof());
-
-      // NB: For what the standard expects of the overflow function,
-      // see _M_really_overflow(), below. Because basic_streambuf's
-      // sputc/sputn call overflow directly, and the complications of
-      // this implementation's setting of the initial pointers all
-      // equal to _M_buf when initializing, it seems essential to have
-      // this in actuality be a helper function that checks for the
-      // eccentricities of this implementation, and then call
-      // overflow() if indeed the buffer is full.
-      virtual int_type 
-      overflow(int_type __c = _Traits::eof());
-
-      // Stroustrup, 1998, p 648
-      // The overflow() function is called to transfer characters to the
-      // real output destination when the buffer is full. A call to
-      // overflow(c) outputs the contents of the buffer plus the
-      // character c.
-      // 27.5.2.4.5 
-      // Consume some sequence of the characters in the pending sequence.
-      int_type 
-      _M_really_overflow(int_type __c = _Traits::eof());
-    
-      virtual __streambuf_type* 
-      setbuf(char_type* __s, streamsize __n);
-    
-      virtual pos_type 
-      seekoff(off_type __off, ios_base::seekdir __way,
-             ios_base::openmode __mode = ios_base::in | ios_base::out);
-
-      virtual pos_type 
-      seekpos(pos_type __pos,
-             ios_base::openmode __mode = ios_base::in | ios_base::out);
-
-      virtual int 
-      sync(void)
-      {
-       bool __testput = _M_out_cur && _M_out_beg < _M_out_end;
-
-       // Make sure that the internal buffer resyncs its idea of
-       // the file position with the external file.
-       if (__testput && !_M_file->sync())
-         {
-           // Need to restore current position. This interpreted as
-           // the position of the external byte sequence (_M_file)
-           // plus the offset in the current internal buffer
-           // (_M_out_beg - _M_out_cur)
-           streamoff __cur = _M_file->seekoff(0, ios_base::cur);
-           off_type __off = _M_out_cur - _M_out_beg;
-           _M_really_overflow();
-           _M_file->seekpos(__cur + __off);
-         }
-       _M_last_overflowed = false;     
-       return 0;
-      }
-      
-      virtual void 
-      imbue(const locale& __loc);
-
-      virtual streamsize 
-      xsgetn(char_type* __s, streamsize __n)
-      {
-       streamsize __ret = 0;
-       // Clear out pback buffer before going on to the real deal...
-       if (_M_pback_init)
-         {
-           while (__ret < __n && _M_in_cur < _M_in_end)
-             {
-               *__s = *_M_in_cur;
-               ++__ret;
-               ++__s;
-               ++_M_in_cur;
-             }
-           _M_pback_destroy();
-         }
-       if (__ret < __n)
-         __ret += __streambuf_type::xsgetn(__s, __n - __ret);
-       return __ret;
-      }
-      virtual streamsize 
-      xsputn(const char_type* __s, streamsize __n)
-      {
-       _M_pback_destroy();
-       return __streambuf_type::xsputn(__s, __n);
-      }
-       
-      void
-      _M_output_unshift();
-    };
-
-
-  // 27.8.1.5  Template class basic_ifstream
-  template<typename _CharT, typename _Traits>
-    class basic_ifstream : public basic_istream<_CharT, _Traits>
-    {
-    public:
-      // Types:
-      typedef _CharT                                   char_type;
-      typedef _Traits                                  traits_type;
-      typedef typename traits_type::int_type           int_type;
-      typedef typename traits_type::pos_type           pos_type;
-      typedef typename traits_type::off_type           off_type;
-
-      // Non-standard types:
-      typedef basic_filebuf<char_type, traits_type>    __filebuf_type;
-      typedef basic_istream<char_type, traits_type>    __istream_type;
-    
-    private:
-      __filebuf_type   _M_filebuf;
-
-    public:
-     // Constructors/Destructors:
-      basic_ifstream()
-      : __istream_type(NULL), _M_filebuf()
-      { this->init(&_M_filebuf); }
-
-      explicit 
-      basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in)
-      : __istream_type(NULL), _M_filebuf()
-      { 
-       this->init(&_M_filebuf); 
-       this->open(__s, __mode); 
-      }
-    
-      ~basic_ifstream()
-      { }
-
-      // Members:
-      __filebuf_type* 
-      rdbuf() const 
-      { return const_cast<__filebuf_type*>(&_M_filebuf); }
-
-      bool 
-      is_open(void) { return _M_filebuf.is_open(); }
-
-      void 
-      open(const char* __s, ios_base::openmode __mode = ios_base::in)
-      { 
-       if (_M_filebuf.open(__s, __mode | ios_base::in) == NULL)
-         this->setstate(ios_base::failbit); 
-      }
-
-      void 
-      close(void)
-      { 
-       if (!_M_filebuf.close())
-         this->setstate(ios_base::failbit);    
-      }
-    };
-
-  
-  // 27.8.1.8  Template class basic_ofstream
-  template<typename _CharT, typename _Traits>
-    class basic_ofstream : public basic_ostream<_CharT,_Traits>
-    {
-    public:
-      // Types:
-      typedef _CharT                                   char_type;
-      typedef _Traits                                  traits_type;
-      typedef typename traits_type::int_type           int_type;
-      typedef typename traits_type::pos_type           pos_type;
-      typedef typename traits_type::off_type           off_type;
-
-      // Non-standard types:
-      typedef basic_filebuf<char_type, traits_type>    __filebuf_type;
-      typedef basic_ostream<char_type, traits_type>    __ostream_type;
-      
-    private:
-      __filebuf_type   _M_filebuf;
-
-    public:
-      // Constructors:
-      basic_ofstream()
-      : __ostream_type(NULL), _M_filebuf()
-      { this->init(&_M_filebuf); }
-      
-      explicit 
-      basic_ofstream(const char* __s, 
-                    ios_base::openmode __mode = ios_base::out|ios_base::trunc)
-      : __ostream_type(NULL), _M_filebuf()
-      { 
-       this->init(&_M_filebuf); 
-       this->open(__s, __mode); 
-      }
-
-      ~basic_ofstream()
-      { }
-
-      // Members:
-      __filebuf_type* 
-      rdbuf(void) const
-      { return const_cast<__filebuf_type*>(&_M_filebuf); }
-      bool 
-      is_open(void) { return _M_filebuf.is_open(); }
-
-      void 
-      open(const char* __s, 
-          ios_base::openmode __mode = ios_base::out | ios_base::trunc)
-      { 
-       if (!_M_filebuf.open(__s, __mode | ios_base::out))
-         this->setstate(ios_base::failbit); 
-      }
-
-      void 
-      close(void)
-      { 
-       if (!_M_filebuf.close())
-         this->setstate(ios_base::failbit); 
-      }
-    };
-
-
-  // 27.8.1.11  Template class basic_fstream
-  template<typename _CharT, typename _Traits>
-    class basic_fstream : public basic_iostream<_CharT, _Traits>
-    {
-    public:
-      // Types:
-      typedef _CharT                                   char_type;
-      typedef _Traits                                  traits_type;
-      typedef typename traits_type::int_type           int_type;
-      typedef typename traits_type::pos_type           pos_type;
-      typedef typename traits_type::off_type           off_type;
-
-      // Non-standard types:
-      typedef basic_filebuf<char_type, traits_type>    __filebuf_type;
-      typedef basic_ios<char_type, traits_type>                __ios_type;
-      typedef basic_iostream<char_type, traits_type>   __iostream_type;
-
-    private:
-      __filebuf_type   _M_filebuf;
-      
-    public:
-      // Constructors/destructor:
-      basic_fstream()
-      : __iostream_type(NULL), _M_filebuf()
-      { this->init(&_M_filebuf); }
-
-      explicit 
-      basic_fstream(const char* __s,
-                   ios_base::openmode __mode = ios_base::in | ios_base::out)
-      : __iostream_type(NULL), _M_filebuf()
-      { 
-       this->init(&_M_filebuf); 
-       this->open(__s, __mode); 
-      }
-      ~basic_fstream()
-      { }
-    
-      // Members:
-      __filebuf_type* 
-      rdbuf(void) const 
-      { return const_cast<__filebuf_type*>(&_M_filebuf); }
-
-      bool 
-      is_open(void) { return _M_filebuf.is_open(); }
-
-      void 
-      open(const char* __s, 
-          ios_base::openmode __mode = ios_base::in | ios_base::out)
-      { 
-       if (!_M_filebuf.open(__s, __mode))
-         setstate(ios_base::failbit); 
-      }
-
-      void 
-      close(void)
-      { 
-       if (!_M_filebuf.close())
-         setstate(ios_base::failbit); 
-      }
-    };
-} // namespace std
-
-
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# define export
-#ifdef  _GLIBCPP_FULLY_COMPLIANT_HEADERS
-# include <bits/fstream.tcc>
-#endif
-#endif
-
-#endif 
-
diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional
deleted file mode 100644 (file)
index 16702ca..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-// <functional> -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
-
-/** @file std_functional.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_FUNCTIONAL
-#define _CPP_FUNCTIONAL 1
-
-#pragma GCC system_header
-#include <bits/c++config.h>
-#include <cstddef>
-#include <bits/stl_function.h>
-
-#endif /* _CPP_FUNCTIONAL */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/libstdc++-v3/include/std/iomanip b/libstdc++-v3/include/std/iomanip
deleted file mode 100644 (file)
index ab279d2..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-// Standard stream manipulators -*- C++ -*-
-
-// Copyright (C) 1997-1999, 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-//
-// ISO C++ 14882: 27.6.3  Standard manipulators
-//
-
-/** @file std_iomanip.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_IOMANIP
-#define _CPP_IOMANIP 1
-
-#pragma GCC system_header
-
-#include <bits/c++config.h>
-#include <istream>
-#include <functional>
-
-namespace std
-{
-
-  struct _Resetiosflags { ios_base::fmtflags _M_mask; };
-
-  inline _Resetiosflags 
-  resetiosflags(ios_base::fmtflags __mask)
-  { 
-    _Resetiosflags __x; 
-    __x._M_mask = __mask; 
-    return __x; 
-  }
-
-  template <class _CharT, class _Traits>
-    basic_istream<_CharT,_Traits>& 
-    operator>>(basic_istream<_CharT,_Traits>& __is, _Resetiosflags __f)
-    { 
-      __is.setf(ios_base::fmtflags(0), __f._M_mask); 
-      return __is; 
-    }
-
-  template <class _CharT, class _Traits>
-    basic_ostream<_CharT,_Traits>& 
-    operator<<(basic_ostream<_CharT,_Traits>& __os, _Resetiosflags __f)
-    { 
-      __os.setf(ios_base::fmtflags(0), __f._M_mask); 
-      return __os; 
-    }
-
-
-  struct _Setiosflags { ios_base::fmtflags _M_mask; };
-
-  inline _Setiosflags 
-  setiosflags(ios_base::fmtflags __mask)
-  { 
-    _Setiosflags __x; 
-    __x._M_mask = __mask; 
-    return __x; 
-  }
-
-  template <class _CharT, class _Traits>
-    basic_istream<_CharT,_Traits>& 
-    operator>>(basic_istream<_CharT,_Traits>& __is, _Setiosflags __f)
-    { 
-      __is.setf(__f._M_mask); 
-      return __is; 
-    }
-
-  template <class _CharT, class _Traits>
-    basic_ostream<_CharT,_Traits>& 
-    operator<<(basic_ostream<_CharT,_Traits>& __os, _Setiosflags __f)
-    { 
-      __os.setf(__f._M_mask); 
-      return __os; 
-    }
-
-
-  struct _Setbase { int _M_base; };
-
-  inline _Setbase 
-  setbase(int __base)
-  { 
-    _Setbase __x; 
-    __x._M_base = __base; 
-    return __x; 
-  }
-
-  template <class _CharT, class _Traits>
-    basic_istream<_CharT,_Traits>& 
-    operator>>(basic_istream<_CharT,_Traits>& __is, _Setbase __f)
-    {
-      __is.setf(__f._M_base ==  8 ? ios_base::oct : 
-             __f._M_base == 10 ? ios_base::dec : 
-             __f._M_base == 16 ? ios_base::hex : 
-             ios_base::fmtflags(0), ios_base::basefield);
-      return __is; 
-    }
-  
-  template <class _CharT, class _Traits>
-    basic_ostream<_CharT,_Traits>& 
-    operator<<(basic_ostream<_CharT,_Traits>& __os, _Setbase __f)
-    {
-      __os.setf(__f._M_base ==  8 ? ios_base::oct : 
-               __f._M_base == 10 ? ios_base::dec : 
-               __f._M_base == 16 ? ios_base::hex : 
-               ios_base::fmtflags(0), ios_base::basefield);
-      return __os; 
-    }
-  
-
-  template<class _CharT> 
-    struct _Setfill { _CharT _M_c; };
-
-  template<class _CharT> 
-    _Setfill<_CharT> 
-    setfill(_CharT __c)
-    { 
-      _Setfill<_CharT> __x; 
-      __x._M_c = __c; 
-      return __x; 
-    }
-
-  template <class _CharT, class _Traits>
-    basic_istream<_CharT,_Traits>& 
-    operator>>(basic_istream<_CharT,_Traits>& __is, _Setfill<_CharT> __f)
-    { 
-      __is.fill(__f._M_c); 
-      return __is; 
-    }
-
-  template <class _CharT, class _Traits>
-    basic_ostream<_CharT,_Traits>& 
-    operator<<(basic_ostream<_CharT,_Traits>& __os, _Setfill<_CharT> __f)
-    { 
-      __os.fill(__f._M_c); 
-      return __os; 
-    }
-
-
-  struct _Setprecision { int _M_n; };
-
-  inline _Setprecision 
-  setprecision(int __n)
-  { 
-    _Setprecision __x; 
-    __x._M_n = __n; 
-    return __x; 
-  }
-
-  template <class _CharT, class _Traits>
-    basic_istream<_CharT,_Traits>& 
-    operator>>(basic_istream<_CharT,_Traits>& __is, _Setprecision __f)
-    { 
-      __is.precision(__f._M_n); 
-      return __is; 
-    }
-
-  template <class _CharT, class _Traits>
-    basic_ostream<_CharT,_Traits>& 
-    operator<<(basic_ostream<_CharT,_Traits>& __os, _Setprecision __f)
-    { 
-      __os.precision(__f._M_n); 
-      return __os; 
-    }
-
-
-  struct _Setw { int _M_n; };
-
-  inline _Setw 
-  setw(int __n)
-  { 
-    _Setw __x; 
-    __x._M_n = __n; 
-    return __x; 
-  }
-
-  template <class _CharT, class _Traits>
-    basic_istream<_CharT,_Traits>& 
-    operator>>(basic_istream<_CharT,_Traits>& __is, _Setw __f)
-    { 
-      __is.width(__f._M_n); 
-      return __is; 
-    }
-
-  template <class _CharT, class _Traits>
-    basic_ostream<_CharT,_Traits>& 
-    operator<<(basic_ostream<_CharT,_Traits>& __os, _Setw __f)
-    { 
-      __os.width(__f._M_n); 
-      return __os; 
-    }
-} // namespace std
-
-#endif 
diff --git a/libstdc++-v3/include/std/ios b/libstdc++-v3/include/std/ios
deleted file mode 100644 (file)
index 1e61c36..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-// Iostreams base classes -*- C++ -*-
-
-// Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-//
-// ISO C++ 14882: 27.4  Iostreams base classes
-//
-
-/** @file std_ios.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_IOS
-#define _CPP_IOS       1
-
-#pragma GCC system_header
-
-#include <iosfwd>
-#include <exception>           // For ios_base::failure
-#include <bits/char_traits.h>  // For char_traits, streamoff, streamsize, fpos
-#include <cstdio>      // For SEEK_SET, SEEK_CUR, SEEK_END
-#include <bits/localefwd.h>    // For class locale
-#include <bits/ios_base.h>     // For ios_base declarations.
-#include <streambuf> 
-#include <bits/basic_ios.h>
-
-#endif /* _CPP_IOS */
-
diff --git a/libstdc++-v3/include/std/iosfwd b/libstdc++-v3/include/std/iosfwd
deleted file mode 100644 (file)
index 93c30b3..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-// Forwarding declarations -*- C++ -*-
-
-// Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-//
-// ISO C++ 14882: 27.2  Forward declarations
-//
-
-/** @file std_iosfwd.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_IOSFWD
-#define _CPP_IOSFWD 1
-
-#pragma GCC system_header
-
-#include <bits/c++config.h>
-#include <bits/stringfwd.h> // For string forward declarations.
-#include <bits/fpos.h>
-#include <bits/functexcept.h>
-
-namespace std 
-{
-  template<typename _CharT, typename _Traits = char_traits<_CharT> >
-    class basic_ios;
-
-  template<typename _CharT, typename _Traits = char_traits<_CharT> >
-    class basic_streambuf;
-
-  template<typename _CharT, typename _Traits = char_traits<_CharT> >
-    class basic_istream;
-
-  template<typename _CharT, typename _Traits = char_traits<_CharT> >
-    class basic_ostream;
-
-  template<typename _CharT, typename _Traits = char_traits<_CharT> >
-    class basic_iostream;
-
-  template<typename _CharT, typename _Traits = char_traits<_CharT>,
-           typename _Alloc = allocator<_CharT> >
-    class basic_stringbuf;
-
-  template<typename _CharT, typename _Traits = char_traits<_CharT>,
-          typename _Alloc = allocator<_CharT> >
-    class basic_istringstream;
-
-  template<typename _CharT, typename _Traits = char_traits<_CharT>,
-          typename _Alloc = allocator<_CharT> >
-    class basic_ostringstream;
-
-  template<typename _CharT, typename _Traits = char_traits<_CharT>,
-          typename _Alloc = allocator<_CharT> >
-    class basic_stringstream;
-
-  template<typename _CharT, typename _Traits = char_traits<_CharT> >
-    class basic_filebuf;
-
-  template<typename _CharT, typename _Traits = char_traits<_CharT> >
-    class basic_ifstream;
-
-  template<typename _CharT, typename _Traits = char_traits<_CharT> >
-    class basic_ofstream;
-
-  template<typename _CharT, typename _Traits = char_traits<_CharT> >
-    class basic_fstream;
-
-  template<typename _CharT, typename _Traits = char_traits<_CharT> >
-    class istreambuf_iterator;
-
-  template<typename _CharT, typename _Traits = char_traits<_CharT> >
-    class ostreambuf_iterator;
-
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-  // Not included.   (??? Apparently no LWG number?)
-  class ios_base; 
-#endif
-
-  typedef basic_ios<char>              ios;
-  typedef basic_streambuf<char>        streambuf;
-  typedef basic_istream<char>          istream;
-  typedef basic_ostream<char>          ostream;
-  typedef basic_iostream<char>                 iostream;
-  typedef basic_stringbuf<char>        stringbuf;
-  typedef basic_istringstream<char>    istringstream;
-  typedef basic_ostringstream<char>    ostringstream;
-  typedef basic_stringstream<char>     stringstream;
-  typedef basic_filebuf<char>          filebuf;
-  typedef basic_ifstream<char>                 ifstream;
-  typedef basic_ofstream<char>                 ofstream;
-  typedef basic_fstream<char>          fstream;
-
-#ifdef _GLIBCPP_USE_WCHAR_T
-  typedef basic_ios<wchar_t>           wios;
-  typedef basic_streambuf<wchar_t>     wstreambuf;
-  typedef basic_istream<wchar_t>       wistream;
-  typedef basic_ostream<wchar_t>       wostream;
-  typedef basic_iostream<wchar_t>      wiostream;
-  typedef basic_stringbuf<wchar_t>     wstringbuf;
-  typedef basic_istringstream<wchar_t>         wistringstream;
-  typedef basic_ostringstream<wchar_t>         wostringstream;
-  typedef basic_stringstream<wchar_t>  wstringstream;
-  typedef basic_filebuf<wchar_t>       wfilebuf;
-  typedef basic_ifstream<wchar_t>      wifstream;
-  typedef basic_ofstream<wchar_t>      wofstream;
-  typedef basic_fstream<wchar_t>       wfstream;
-#endif
-} // namespace std
-
-#endif
diff --git a/libstdc++-v3/include/std/iostream b/libstdc++-v3/include/std/iostream
deleted file mode 100644 (file)
index 47b8379..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-// Standard iostream objects -*- C++ -*-
-
-// Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-//
-// ISO C++ 14882: 27.3  Standard iostream objects
-//
-
-/** @file std_iostream.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_IOSTREAM
-#define _CPP_IOSTREAM  1
-
-#pragma GCC system_header
-
-#include <bits/c++config.h>
-#include <ostream>
-#include <istream>
-
-namespace std 
-{
-  extern istream cin;
-  extern ostream cout;
-  extern ostream cerr;
-  extern ostream clog;
-#ifdef _GLIBCPP_USE_WCHAR_T
-  extern wistream wcin;
-  extern wostream wcout;
-  extern wostream wcerr;
-  extern wostream wclog;
-#endif
-
-  // For construction of filebuffers for cout, cin, cerr, clog et. al.
-  static ios_base::Init __ioinit;
-} // namespace std
-
-#endif
diff --git a/libstdc++-v3/include/std/istream b/libstdc++-v3/include/std/istream
deleted file mode 100644 (file)
index 7b51852..0000000
+++ /dev/null
@@ -1,299 +0,0 @@
-// Input streams -*- C++ -*-
-
-// Copyright (C) 1997-1999, 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-//
-// ISO C++ 14882: 27.6.1  Input streams
-//
-
-/** @file std_istream.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_ISTREAM
-#define _CPP_ISTREAM   1
-
-#pragma GCC system_header
-
-#include <ios>
-#include <limits> // For numeric_limits
-
-namespace std
-{
-  // 27.6.1.1 Template class basic_istream
-  template<typename _CharT, typename _Traits>
-    class basic_istream : virtual public basic_ios<_CharT, _Traits>
-    {
-    public:
-      // Types (inherited from basic_ios (27.4.4)):
-      typedef _CharT                                   char_type;
-      typedef typename _Traits::int_type               int_type;
-      typedef typename _Traits::pos_type               pos_type;
-      typedef typename _Traits::off_type               off_type;
-      typedef _Traits                                  traits_type;
-      
-      // Non-standard Types:
-      typedef basic_streambuf<_CharT, _Traits>                 __streambuf_type;
-      typedef basic_ios<_CharT, _Traits>               __ios_type;
-      typedef basic_istream<_CharT, _Traits>           __istream_type;
-      typedef istreambuf_iterator<_CharT, _Traits>     __istreambuf_iter;
-      typedef num_get<_CharT, __istreambuf_iter>        __numget_type;
-      typedef ctype<_CharT>                            __ctype_type;
-
-    protected:
-      // Data Members:
-      streamsize               _M_gcount;
-
-    public:
-      // 27.6.1.1.1 Constructor/destructor:
-      explicit 
-      basic_istream(__streambuf_type* __sb)
-      { 
-       this->init(__sb);
-       _M_gcount = streamsize(0);
-      }
-
-      virtual 
-      ~basic_istream() 
-      { _M_gcount = streamsize(0); }
-
-      // 27.6.1.1.2 Prefix/suffix:
-      class sentry;
-      friend class sentry;
-
-      // 27.6.1.2 Formatted input:
-      // 27.6.1.2.3 basic_istream::operator>>
-      __istream_type&
-      operator>>(__istream_type& (*__pf)(__istream_type&));
-
-      __istream_type&
-      operator>>(__ios_type& (*__pf)(__ios_type&));
-
-      __istream_type&
-      operator>>(ios_base& (*__pf)(ios_base&));
-      
-      // 27.6.1.2.2 Arithmetic Extractors
-      __istream_type& 
-      operator>>(bool& __n);
-      
-      __istream_type& 
-      operator>>(short& __n);
-      
-      __istream_type& 
-      operator>>(unsigned short& __n);
-
-      __istream_type& 
-      operator>>(int& __n);
-      
-      __istream_type& 
-      operator>>(unsigned int& __n);
-
-      __istream_type& 
-      operator>>(long& __n);
-      
-      __istream_type& 
-      operator>>(unsigned long& __n);
-
-#ifdef _GLIBCPP_USE_LONG_LONG
-      __istream_type& 
-      operator>>(long long& __n);
-
-      __istream_type& 
-      operator>>(unsigned long long& __n);
-#endif
-
-      __istream_type& 
-      operator>>(float& __f);
-
-      __istream_type& 
-      operator>>(double& __f);
-
-      __istream_type& 
-      operator>>(long double& __f);
-
-      __istream_type& 
-      operator>>(void*& __p);
-
-      __istream_type& 
-      operator>>(__streambuf_type* __sb);
-      
-      // 27.6.1.3 Unformatted input:
-      inline streamsize 
-      gcount(void) const 
-      { return _M_gcount; }
-      
-      int_type 
-      get(void);
-
-      __istream_type& 
-      get(char_type& __c);
-
-      __istream_type& 
-      get(char_type* __s, streamsize __n, char_type __delim);
-
-      inline __istream_type& 
-      get(char_type* __s, streamsize __n)
-      { return this->get(__s, __n, this->widen('\n')); }
-
-      __istream_type&
-      get(__streambuf_type& __sb, char_type __delim);
-
-      inline __istream_type&
-      get(__streambuf_type& __sb)
-      { return this->get(__sb, this->widen('\n')); }
-
-      __istream_type& 
-      getline(char_type* __s, streamsize __n, char_type __delim);
-
-      inline __istream_type& 
-      getline(char_type* __s, streamsize __n)
-      { return this->getline(__s, __n, this->widen('\n')); }
-
-      __istream_type& 
-      ignore(streamsize __n = 1, int_type __delim = traits_type::eof());
-      
-      int_type 
-      peek(void);
-      
-      __istream_type& 
-      read(char_type* __s, streamsize __n);
-
-      streamsize 
-      readsome(char_type* __s, streamsize __n);
-      
-      __istream_type& 
-      putback(char_type __c);
-
-      __istream_type& 
-      unget(void);
-
-      int 
-      sync(void);
-
-      pos_type 
-      tellg(void);
-
-      __istream_type& 
-      seekg(pos_type);
-
-      __istream_type& 
-      seekg(off_type, ios_base::seekdir);
-
-    private:
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-      // Not defined.  (Side effect of DR 50.)
-      __istream_type& 
-      operator=(const __istream_type&);
-
-      basic_istream(const __istream_type&);
-#endif
-    };
-  
-  template<typename _CharT, typename _Traits>
-    class basic_istream<_CharT, _Traits>::sentry
-    {
-    public:
-      typedef _Traits                                  traits_type;
-      typedef basic_streambuf<_CharT, _Traits>                 __streambuf_type;
-      typedef basic_istream<_CharT, _Traits>           __istream_type;
-      typedef typename __istream_type::__ctype_type    __ctype_type;
-      typedef typename _Traits::int_type               __int_type;
-
-      explicit 
-      sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false);
-
-      operator bool() { return _M_ok; }
-
-    private:
-      bool _M_ok;
-    };
-
-  // 27.6.1.2.3 Character extraction templates
-  template<typename _CharT, typename _Traits>
-    basic_istream<_CharT, _Traits>&
-    operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c);
-
-  template<class _Traits>
-    basic_istream<char, _Traits>&
-    operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
-    { return (__in >> reinterpret_cast<char&>(__c)); }
-
-  template<class _Traits>
-    basic_istream<char, _Traits>&
-    operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
-    { return (__in >> reinterpret_cast<char&>(__c)); }
-
-  template<typename _CharT, typename _Traits>
-    basic_istream<_CharT, _Traits>&
-    operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s);
-  
-  template<class _Traits>
-    basic_istream<char,_Traits>&
-    operator>>(basic_istream<char,_Traits>& __in, unsigned char* __s)
-    { return (__in >> reinterpret_cast<char*>(__s)); }
-
-  template<class _Traits>
-    basic_istream<char,_Traits>&
-    operator>>(basic_istream<char,_Traits>& __in, signed char* __s)
-    { return (__in >> reinterpret_cast<char*>(__s)); }
-
-  // 27.6.1.5 Template class basic_iostream
-  template<typename _CharT, typename _Traits>
-    class basic_iostream
-    : public basic_istream<_CharT, _Traits>,
-      public basic_ostream<_CharT, _Traits>
-    {
-    public:
-      // Non-standard Types:
-      typedef basic_istream<_CharT, _Traits>           __istream_type;
-      typedef basic_ostream<_CharT, _Traits>           __ostream_type;
-
-      explicit 
-      basic_iostream(basic_streambuf<_CharT, _Traits>* __sb)
-      : __istream_type(__sb), __ostream_type(__sb)
-      { }
-
-      virtual 
-      ~basic_iostream() { }
-    };
-
-  // 27.6.1.4 Standard basic_istream manipulators
-  template<typename _CharT, typename _Traits>
-    basic_istream<_CharT, _Traits>& 
-    ws(basic_istream<_CharT, _Traits>& __is);
-} // namespace std
-
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# define export
-#ifdef  _GLIBCPP_FULLY_COMPLIANT_HEADERS
-# include <bits/istream.tcc>
-#endif
-#endif
-
-#endif /* _CPP_ISTREAM */
diff --git a/libstdc++-v3/include/std/iterator b/libstdc++-v3/include/std/iterator
deleted file mode 100644 (file)
index f0eee11..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-// <iterator> -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-/** @file std_iterator.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_ITERATOR
-#define _CPP_ITERATOR 1
-
-#pragma GCC system_header
-#include <bits/c++config.h>
-#include <cstddef>
-#include <bits/stl_iterator_base_types.h>
-#include <bits/stl_iterator_base_funcs.h>
-#include <bits/stl_iterator.h>
-#include <ostream>
-#include <istream>
-#include <bits/stream_iterator.h>
-#include <bits/streambuf_iterator.h>
-
-#endif /* _CPP_ITERATOR */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/libstdc++-v3/include/std/limits b/libstdc++-v3/include/std/limits
deleted file mode 100644 (file)
index 7a64636..0000000
+++ /dev/null
@@ -1,2017 +0,0 @@
-// The template and inlines for the -*- C++ -*- numeric_limits classes.
-
-// Copyright (C) 1999-2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-// Note: this is not a conforming implementation.
-// Written by Gabriel Dos Reis <gdr@codesourcery.com>
-
-//
-// ISO 14882:1998
-// 18.2.1
-//
-
-/** @file std_limits.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_NUMERIC_LIMITS
-#define _CPP_NUMERIC_LIMITS 1
-
-#pragma GCC system_header
-
-#include <bits/cpu_limits.h>
-#include <bits/c++config.h>
-
-//
-// The numeric_limits<> traits document implementation-defined aspects
-// of fundamental arithmetic data types (integers and floating points).
-// From Standard C++ point of view, there are 13 such types:
-//   * integers
-//         bool                                                        (1)
-//         char, signed char, unsigned char                    (3)
-//         short, unsigned short                               (2)
-//         int, unsigned                                       (2)
-//         long, unsigned long                                 (2)
-//
-//   * floating points
-//         float                                               (1)
-//         double                                              (1)
-//         long double                                         (1)
-//
-// GNU C++ undertstands (where supported by the host C-library) 
-//   * integer
-//         long long, unsigned long long                       (2)
-//
-// which brings us to 15 fundamental arithmetic data types in GNU C++.
-//
-// 
-// Since a numeric_limits<> is a bit tricky to get right, we rely on
-// an interface composed of macros which should be defined in config/os
-// or config/cpu when they differ from the generic (read arbitrary)
-// definitions given here.
-//
-
-// These values can be overridden in the target configuration file.
-// The default values are appropriate for many 32-bit targets.
-
-#ifndef __glibcpp_char_bits
-#define __glibcpp_char_bits 8
-#endif
-#ifdef __CHAR_UNSIGNED__
-#define __glibcpp_plain_char_is_signed false
-#else
-#define __glibcpp_plain_char_is_signed true
-#endif
-#ifndef __glibcpp_short_bits
-#define __glibcpp_short_bits 16
-#endif
-#ifndef __glibcpp_int_bits
-#define __glibcpp_int_bits 32
-#endif
-#ifndef __glibcpp_long_bits
-#define __glibcpp_long_bits 32
-#endif
-#ifndef __glibcpp_wchar_t_bits
-#define __glibcpp_wchar_t_bits 32
-#endif
-#ifndef __glibcpp_wchar_t_is_signed
-#define __glibcpp_wchar_t_is_signed true
-#endif
-#ifndef __glibcpp_long_long_bits
-#define __glibcpp_long_long_bits 64
-#endif
-#ifndef __glibcpp_float_bits
-#define __glibcpp_float_bits 32
-#endif
-#ifndef __glibcpp_double_bits
-#define __glibcpp_double_bits 64
-#endif
-#ifndef __glibcpp_long_double_bits
-#define __glibcpp_long_double_bits 128
-#endif
-
-#ifndef __glibcpp_char_traps
-#define __glibcpp_char_traps true
-#endif
-#ifndef __glibcpp_short_traps
-#define __glibcpp_short_traps true
-#endif
-#ifndef __glibcpp_int_traps
-#define __glibcpp_int_traps true
-#endif
-#ifndef __glibcpp_long_traps
-#define __glibcpp_long_traps true
-#endif
-#ifndef __glibcpp_wchar_t_traps
-#define __glibcpp_wchar_t_traps true
-#endif
-#ifndef __glibcpp_long_long_traps
-#define __glibcpp_long_long_traps true
-#endif
-
-// You should not need to define any macros below this point, unless
-// you have a machine with non-standard bit-widths.
-
-// These values are the minimums and maximums for standard data types
-// of common widths.
-
-#define __glibcpp_s8_max 127
-#define __glibcpp_s8_min (-__glibcpp_s8_max - 1)
-#define __glibcpp_s8_digits 7
-#define __glibcpp_s8_digits10 2
-#define __glibcpp_u8_min 0U
-#define __glibcpp_u8_max (__glibcpp_s8_max * 2 + 1)
-#define __glibcpp_u8_digits 8
-#define __glibcpp_u8_digits10 2
-#define __glibcpp_s16_max 32767
-#define __glibcpp_s16_min (-__glibcpp_s16_max - 1)
-#define __glibcpp_s16_digits 15
-#define __glibcpp_s16_digits10 4
-#define __glibcpp_u16_min 0U
-#define __glibcpp_u16_max (__glibcpp_s16_max * 2 + 1)
-#define __glibcpp_u16_digits 16
-#define __glibcpp_u16_digits10 4
-#define __glibcpp_s32_max 2147483647L
-#define __glibcpp_s32_min (-__glibcpp_s32_max - 1)
-#define __glibcpp_s32_digits 31
-#define __glibcpp_s32_digits10 9
-#define __glibcpp_u32_min 0UL
-#define __glibcpp_u32_max (__glibcpp_s32_max * 2U + 1)
-#define __glibcpp_u32_digits 32
-#define __glibcpp_u32_digits10 9
-#define __glibcpp_s64_max 9223372036854775807LL
-#define __glibcpp_s64_min (-__glibcpp_s64_max - 1)
-#define __glibcpp_s64_digits 63
-#define __glibcpp_s64_digits10 18
-#define __glibcpp_u64_min 0ULL
-#define __glibcpp_u64_max (__glibcpp_s64_max * 2ULL + 1)
-#define __glibcpp_u64_digits 64
-#define __glibcpp_u64_digits10 19
-
-#define __glibcpp_f32_min 1.17549435e-38F
-#define __glibcpp_f32_max 3.40282347e+38F
-#define __glibcpp_f32_digits 24
-#define __glibcpp_f32_digits10 6
-#define __glibcpp_f32_radix 2
-#define __glibcpp_f32_epsilon 1.19209290e-07F
-#define __glibcpp_f32_round_error 1.0F
-#define __glibcpp_f32_min_exponent -125
-#define __glibcpp_f32_min_exponent10 -37
-#define __glibcpp_f32_max_exponent 128
-#define __glibcpp_f32_max_exponent10 38
-#define __glibcpp_f64_min 2.2250738585072014e-308
-#define __glibcpp_f64_max 1.7976931348623157e+308
-#define __glibcpp_f64_digits 53
-#define __glibcpp_f64_digits10 15
-#define __glibcpp_f64_radix 2
-#define __glibcpp_f64_epsilon 2.2204460492503131e-16
-#define __glibcpp_f64_round_error 1.0
-#define __glibcpp_f64_min_exponent -1021
-#define __glibcpp_f64_min_exponent10 -307
-#define __glibcpp_f64_max_exponent 1024
-#define __glibcpp_f64_max_exponent10 308
-#define __glibcpp_f80_min 3.36210314311209350626e-4932L
-#define __glibcpp_f80_max 1.18973149535723176502e+4932L
-#define __glibcpp_f80_digits 64
-#define __glibcpp_f80_digits10 18
-#define __glibcpp_f80_radix 2
-#define __glibcpp_f80_epsilon 1.08420217248550443401e-19L
-#define __glibcpp_f80_round_error 1.0L
-#define __glibcpp_f80_min_exponent -16381
-#define __glibcpp_f80_min_exponent10 -4931
-#define __glibcpp_f80_max_exponent 16384
-#define __glibcpp_f80_max_exponent10 4932
-#define __glibcpp_f96_min 1.68105157155604675313e-4932L
-#define __glibcpp_f96_max 1.18973149535723176502e+4932L
-#define __glibcpp_f96_digits 64
-#define __glibcpp_f96_digits10 18
-#define __glibcpp_f96_radix 2
-#define __glibcpp_f96_epsilon 1.08420217248550443401e-19L
-#define __glibcpp_f96_round_error 1.0L
-#define __glibcpp_f96_min_exponent -16382
-#define __glibcpp_f96_min_exponent10 -4931
-#define __glibcpp_f96_max_exponent 16384
-#define __glibcpp_f96_max_exponent10 4932
-#define __glibcpp_f128_min 3.362103143112093506262677817321752603E-4932L
-#define __glibcpp_f128_max 1.189731495357231765085759326628007016E+4932L
-#define __glibcpp_f128_digits 113
-#define __glibcpp_f128_digits10 33
-#define __glibcpp_f128_radix 2
-#define __glibcpp_f128_epsilon 1.925929944387235853055977942584927319E-34L
-#define __glibcpp_f128_round_error 1.0L
-#define __glibcpp_f128_min_exponent -16381
-#define __glibcpp_f128_min_exponent10 -4931
-#define __glibcpp_f128_max_exponent 16384
-#define __glibcpp_f128_max_exponent10 4932
-
-// bool-specific hooks:
-//     __glibcpp_bool_digits  __glibcpp_int_traps __glibcpp_long_traps
-
-// This is actually CHAR_BITS because the new ABI says a bool
-// is one (1) byte wide.
-
-#ifndef __glibcpp_bool_digits
-#define __glibcpp_bool_digits __glibcpp_char_bits
-#endif
-
-// char.
-
-#define __glibcpp_plain_char_traps true
-#define __glibcpp_signed_char_traps true
-#define __glibcpp_unsigned_char_traps true
-#ifndef __glibcpp_char_is_modulo
-#define __glibcpp_char_is_modulo true
-#endif
-#ifndef __glibcpp_signed_char_is_modulo
-#define __glibcpp_signed_char_is_modulo true
-#endif
-#if __glibcpp_char_bits == 8
-#define __glibcpp_signed_char_min __glibcpp_s8_min
-#define __glibcpp_signed_char_max __glibcpp_s8_max
-#define __glibcpp_signed_char_digits __glibcpp_s8_digits
-#define __glibcpp_signed_char_digits10 __glibcpp_s8_digits10
-#define __glibcpp_unsigned_char_min __glibcpp_u8_min
-#define __glibcpp_unsigned_char_max __glibcpp_u8_max
-#define __glibcpp_unsigned_char_digits __glibcpp_u8_digits
-#define __glibcpp_unsigned_char_digits10 __glibcpp_u8_digits10
-#elif __glibcpp_char_bits == 16
-#define __glibcpp_signed_char_min __glibcpp_s16_min
-#define __glibcpp_signed_char_max __glibcpp_s16_max
-#define __glibcpp_signed_char_digits __glibcpp_s16_digits
-#define __glibcpp_signed_char_digits10 __glibcpp_s16_digits10
-#define __glibcpp_unsigned_char_min __glibcpp_u16_min
-#define __glibcpp_unsigned_char_max __glibcpp_u16_max
-#define __glibcpp_unsigned_char_digits __glibcpp_u16_digits
-#define __glibcpp_unsigned_char_digits10 __glibcpp_u16_digits10
-#elif __glibcpp_char_bits == 32
-#define __glibcpp_signed_char_min (signed char)__glibcpp_s32_min
-#define __glibcpp_signed_char_max (signed char)__glibcpp_s32_max
-#define __glibcpp_signed_char_digits __glibcpp_s32_digits
-#define __glibcpp_signed_char_digits10 __glibcpp_s32_digits10
-#define __glibcpp_unsigned_char_min (unsigned char)__glibcpp_u32_min
-#define __glibcpp_unsigned_char_max (unsigned char)__glibcpp_u32_max
-#define __glibcpp_unsigned_char_digits __glibcpp_u32_digits
-#define __glibcpp_unsigned_char_digits10 __glibcpp_u32_digits10
-#elif __glibcpp_char_bits == 64
-#define __glibcpp_signed_char_min (signed char)__glibcpp_s64_min
-#define __glibcpp_signed_char_max (signed char)__glibcpp_s64_max
-#define __glibcpp_signed_char_digits __glibcpp_s64_digits
-#define __glibcpp_signed_char_digits10 __glibcpp_s64_digits10
-#define __glibcpp_unsigned_char_min (unsigned char)__glibcpp_u64_min
-#define __glibcpp_unsigned_char_max (unsigned char)__glibcpp_u64_max
-#define __glibcpp_unsigned_char_digits __glibcpp_u64_digits
-#define __glibcpp_unsigned_char_digits10 __glibcpp_u64_digits10
-#else
-// You must define these macros in the configuration file.
-#endif
-
-#if __glibcpp_plain_char_is_signed
-#define __glibcpp_char_min (char)__glibcpp_signed_char_min
-#define __glibcpp_char_max (char)__glibcpp_signed_char_max
-#define __glibcpp_char_digits __glibcpp_signed_char_digits
-#define __glibcpp_char_digits10 __glibcpp_signed_char_digits
-#else
-#define __glibcpp_char_min (char)__glibcpp_unsigned_char_min
-#define __glibcpp_char_max (char)__glibcpp_unsigned_char_max
-#define __glibcpp_char_digits __glibcpp_unsigned_char_digits
-#define __glibcpp_char_digits10 __glibcpp_unsigned_char_digits
-#endif
-
-// short
-
-#define __glibcpp_signed_short_traps true
-#define __glibcpp_unsigned_short_traps true
-#ifndef __glibcpp_signed_short_is_modulo
-#define __glibcpp_signed_short_is_modulo true
-#endif
-#if __glibcpp_short_bits == 8
-#define __glibcpp_signed_short_min __glibcpp_s8_min
-#define __glibcpp_signed_short_max __glibcpp_s8_max
-#define __glibcpp_signed_short_digits __glibcpp_s8_digits
-#define __glibcpp_signed_short_digits10 __glibcpp_s8_digits10
-#define __glibcpp_unsigned_short_min __glibcpp_u8_min
-#define __glibcpp_unsigned_short_max __glibcpp_u8_max
-#define __glibcpp_unsigned_short_digits __glibcpp_u8_digits
-#define __glibcpp_unsigned_short_digits10 __glibcpp_u8_digits10
-#elif __glibcpp_short_bits == 16
-#define __glibcpp_signed_short_min __glibcpp_s16_min
-#define __glibcpp_signed_short_max __glibcpp_s16_max
-#define __glibcpp_signed_short_digits __glibcpp_s16_digits
-#define __glibcpp_signed_short_digits10 __glibcpp_s16_digits10
-#define __glibcpp_unsigned_short_min __glibcpp_u16_min
-#define __glibcpp_unsigned_short_max __glibcpp_u16_max
-#define __glibcpp_unsigned_short_digits __glibcpp_u16_digits
-#define __glibcpp_unsigned_short_digits10 __glibcpp_u16_digits10
-#elif __glibcpp_short_bits == 32
-#define __glibcpp_signed_short_min (short)__glibcpp_s32_min
-#define __glibcpp_signed_short_max (short)__glibcpp_s32_max
-#define __glibcpp_signed_short_digits __glibcpp_s32_digits
-#define __glibcpp_signed_short_digits10 __glibcpp_s32_digits10
-#define __glibcpp_unsigned_short_min (unsigned short)__glibcpp_u32_min
-#define __glibcpp_unsigned_short_max (unsigned short)__glibcpp_u32_max
-#define __glibcpp_unsigned_short_digits __glibcpp_u32_digits
-#define __glibcpp_unsigned_short_digits10 __glibcpp_u32_digits10
-#elif __glibcpp_short_bits == 64
-#define __glibcpp_signed_short_min (short)__glibcpp_s64_min
-#define __glibcpp_signed_short_max (short)__glibcpp_s64_max
-#define __glibcpp_signed_short_digits __glibcpp_s64_digits
-#define __glibcpp_signed_short_digits10 __glibcpp_s64_digits10
-#define __glibcpp_unsigned_short_min (unsigned short)__glibcpp_u64_min
-#define __glibcpp_unsigned_short_max (unsigned short)__glibcpp_u64_max
-#define __glibcpp_unsigned_short_digits __glibcpp_u64_digits
-#define __glibcpp_unsigned_short_digits10 __glibcpp_u64_digits10
-#else
-// You must define these macros in the configuration file.
-#endif
-
-// int
-
-#define __glibcpp_signed_int_traps true
-#define __glibcpp_unsigned_int_traps true
-#ifndef __glibcpp_signed_int_is_modulo
-#define __glibcpp_signed_int_is_modulo true
-#endif
-#if __glibcpp_int_bits == 8
-#define __glibcpp_signed_int_min __glibcpp_s8_min
-#define __glibcpp_signed_int_max __glibcpp_s8_max
-#define __glibcpp_signed_int_digits __glibcpp_s8_digits
-#define __glibcpp_signed_int_digits10 __glibcpp_s8_digits10
-#define __glibcpp_unsigned_int_min __glibcpp_u8_min
-#define __glibcpp_unsigned_int_max __glibcpp_u8_max
-#define __glibcpp_unsigned_int_digits __glibcpp_u8_digits
-#define __glibcpp_unsigned_int_digits10 __glibcpp_u8_digits10
-#elif __glibcpp_int_bits == 16
-#define __glibcpp_signed_int_min __glibcpp_s16_min
-#define __glibcpp_signed_int_max __glibcpp_s16_max
-#define __glibcpp_signed_int_digits __glibcpp_s16_digits
-#define __glibcpp_signed_int_digits10 __glibcpp_s16_digits10
-#define __glibcpp_unsigned_int_min __glibcpp_u16_min
-#define __glibcpp_unsigned_int_max __glibcpp_u16_max
-#define __glibcpp_unsigned_int_digits __glibcpp_u16_digits
-#define __glibcpp_unsigned_int_digits10 __glibcpp_u16_digits10
-#elif __glibcpp_int_bits == 32
-#define __glibcpp_signed_int_min (int)__glibcpp_s32_min
-#define __glibcpp_signed_int_max (int)__glibcpp_s32_max
-#define __glibcpp_signed_int_digits __glibcpp_s32_digits
-#define __glibcpp_signed_int_digits10 __glibcpp_s32_digits10
-#define __glibcpp_unsigned_int_min (unsigned)__glibcpp_u32_min
-#define __glibcpp_unsigned_int_max (unsigned)__glibcpp_u32_max
-#define __glibcpp_unsigned_int_digits __glibcpp_u32_digits
-#define __glibcpp_unsigned_int_digits10 __glibcpp_u32_digits10
-#elif __glibcpp_int_bits == 64
-#define __glibcpp_signed_int_min (int)__glibcpp_s64_min
-#define __glibcpp_signed_int_max (int)__glibcpp_s64_max
-#define __glibcpp_signed_int_digits __glibcpp_s64_digits
-#define __glibcpp_signed_int_digits10 __glibcpp_s64_digits10
-#define __glibcpp_unsigned_int_min (unsigned)__glibcpp_u64_min
-#define __glibcpp_unsigned_int_max (unsigned)__glibcpp_u64_max
-#define __glibcpp_unsigned_int_digits __glibcpp_u64_digits
-#define __glibcpp_unsigned_int_digits10 __glibcpp_u64_digits10
-#else
-// You must define these macros in the configuration file.
-#endif
-
-// long
-
-#define __glibcpp_signed_long_traps true
-#define __glibcpp_unsigned_long_traps true
-#ifndef __glibcpp_signed_long_is_modulo
-#define __glibcpp_signed_long_is_modulo true
-#endif
-#if __glibcpp_long_bits == 8
-#define __glibcpp_signed_long_min __glibcpp_s8_min
-#define __glibcpp_signed_long_max __glibcpp_s8_max
-#define __glibcpp_signed_long_digits __glibcpp_s8_digits
-#define __glibcpp_signed_long_digits10 __glibcpp_s8_digits10
-#define __glibcpp_unsigned_long_min __glibcpp_u8_min
-#define __glibcpp_unsigned_long_max __glibcpp_u8_max
-#define __glibcpp_unsigned_long_digits __glibcpp_u8_digits
-#define __glibcpp_unsigned_long_digits10 __glibcpp_u8_digits10
-#elif __glibcpp_long_bits == 16
-#define __glibcpp_signed_long_min __glibcpp_s16_min
-#define __glibcpp_signed_long_max __glibcpp_s16_max
-#define __glibcpp_signed_long_digits __glibcpp_s16_digits
-#define __glibcpp_signed_long_digits10 __glibcpp_s16_digits10
-#define __glibcpp_unsigned_long_min __glibcpp_u16_min
-#define __glibcpp_unsigned_long_max __glibcpp_u16_max
-#define __glibcpp_unsigned_long_digits __glibcpp_u16_digits
-#define __glibcpp_unsigned_long_digits10 __glibcpp_u16_digits10
-#elif __glibcpp_long_bits == 32
-#define __glibcpp_signed_long_min __glibcpp_s32_min
-#define __glibcpp_signed_long_max __glibcpp_s32_max
-#define __glibcpp_signed_long_digits __glibcpp_s32_digits
-#define __glibcpp_signed_long_digits10 __glibcpp_s32_digits10
-#define __glibcpp_unsigned_long_min __glibcpp_u32_min
-#define __glibcpp_unsigned_long_max __glibcpp_u32_max
-#define __glibcpp_unsigned_long_digits __glibcpp_u32_digits
-#define __glibcpp_unsigned_long_digits10 __glibcpp_u32_digits10
-#elif __glibcpp_long_bits == 64
-#define __glibcpp_signed_long_min (long)__glibcpp_s64_min
-#define __glibcpp_signed_long_max (long)__glibcpp_s64_max
-#define __glibcpp_signed_long_digits __glibcpp_s64_digits
-#define __glibcpp_signed_long_digits10 __glibcpp_s64_digits10
-#define __glibcpp_unsigned_long_min (unsigned long)__glibcpp_u64_min
-#define __glibcpp_unsigned_long_max (unsigned long)__glibcpp_u64_max
-#define __glibcpp_unsigned_long_digits __glibcpp_u64_digits
-#define __glibcpp_unsigned_long_digits10 __glibcpp_u64_digits10
-#else
-// You must define these macros in the configuration file.
-#endif
-
-// long long
-
-#define __glibcpp_signed_long_long_traps true
-#define __glibcpp_signed_long_long_traps true
-#ifndef __glibcpp_signed_long_long_is_modulo
-#define __glibcpp_signed_long_long_is_modulo true
-#endif
-#if __glibcpp_long_long_bits == 8
-#define __glibcpp_signed_long_long_min __glibcpp_s8_min
-#define __glibcpp_signed_long_long_max __glibcpp_s8_max
-#define __glibcpp_signed_long_long_digits __glibcpp_s8_digits
-#define __glibcpp_signed_long_long_digits10 __glibcpp_s8_digits10
-#define __glibcpp_unsigned_long_long_min __glibcpp_u8_min
-#define __glibcpp_unsigned_long_long_max __glibcpp_u8_max
-#define __glibcpp_unsigned_long_long_digits __glibcpp_u8_digits
-#define __glibcpp_unsigned_long_long_digits10 __glibcpp_u8_digits10
-#elif __glibcpp_long_long_bits == 16
-#define __glibcpp_signed_long_long_min __glibcpp_s16_min
-#define __glibcpp_signed_long_long_max __glibcpp_s16_max
-#define __glibcpp_signed_long_long_digits __glibcpp_s16_digits
-#define __glibcpp_signed_long_long_digits10 __glibcpp_s16_digits10
-#define __glibcpp_unsigned_long_long_min __glibcpp_u16_min
-#define __glibcpp_unsigned_long_long_max __glibcpp_u16_max
-#define __glibcpp_unsigned_long_long_digits __glibcpp_u16_digits
-#define __glibcpp_unsigned_long_long_digits10 __glibcpp_u16_digits10
-#elif __glibcpp_long_long_bits == 32
-#define __glibcpp_signed_long_long_min __glibcpp_s32_min
-#define __glibcpp_signed_long_long_max __glibcpp_s32_max
-#define __glibcpp_signed_long_long_digits __glibcpp_s32_digits
-#define __glibcpp_signed_long_long_digits10 __glibcpp_s32_digits10
-#define __glibcpp_unsigned_long_long_min __glibcpp_u32_min
-#define __glibcpp_unsigned_long_long_max __glibcpp_u32_max
-#define __glibcpp_unsigned_long_long_digits __glibcpp_u32_digits
-#define __glibcpp_unsigned_long_long_digits10 __glibcpp_u32_digits10
-#elif __glibcpp_long_long_bits == 64
-#define __glibcpp_signed_long_long_min __glibcpp_s64_min
-#define __glibcpp_signed_long_long_max __glibcpp_s64_max
-#define __glibcpp_signed_long_long_digits __glibcpp_s64_digits
-#define __glibcpp_signed_long_long_digits10 __glibcpp_s64_digits10
-#define __glibcpp_signed_long_long_traps true
-#define __glibcpp_unsigned_long_long_min __glibcpp_u64_min
-#define __glibcpp_unsigned_long_long_max __glibcpp_u64_max
-#define __glibcpp_unsigned_long_long_digits __glibcpp_u64_digits
-#define __glibcpp_unsigned_long_long_digits10 __glibcpp_u64_digits10
-#define __glibcpp_unsigned_long_long_traps true
-#else
-// You must define these macros in the configuration file.
-#endif
-
-// wchar_t
-
-#define __glibcpp_wchar_t_traps true
-#ifndef __glibcpp_wchar_t_is_modulo
-#define __glibcpp_wchar_t_is_modulo true
-#endif
-#if __glibcpp_wchar_t_is_signed
-#if __glibcpp_wchar_t_bits == 8
-#define __glibcpp_wchar_t_min __glibcpp_s8_min
-#define __glibcpp_wchar_t_max __glibcpp_s8_max
-#define __glibcpp_wchar_t_digits __glibcpp_s8_digits
-#define __glibcpp_wchar_t_digits10 __glibcpp_s8_digits10
-#elif __glibcpp_wchar_t_bits == 16
-#define __glibcpp_wchar_t_min __glibcpp_s16_min
-#define __glibcpp_wchar_t_max __glibcpp_s16_max
-#define __glibcpp_wchar_t_digits __glibcpp_s16_digits
-#define __glibcpp_wchar_t_digits10 __glibcpp_s16_digits10
-#elif __glibcpp_wchar_t_bits == 32
-#define __glibcpp_wchar_t_min (wchar_t)__glibcpp_s32_min
-#define __glibcpp_wchar_t_max (wchar_t)__glibcpp_s32_max
-#define __glibcpp_wchar_t_digits __glibcpp_s32_digits
-#define __glibcpp_wchar_t_digits10 __glibcpp_s32_digits10
-#elif __glibcpp_wchar_t_bits == 64
-#define __glibcpp_wchar_t_min (wchar_t)__glibcpp_s64_min
-#define __glibcpp_wchar_t_max (wchar_t)__glibcpp_s64_max
-#define __glibcpp_wchar_t_digits __glibcpp_s64_digits
-#define __glibcpp_wchar_t_digits10 __glibcpp_s64_digits10
-#else
-// You must define these macros in the configuration file.
-#endif
-#else
-#if __glibcpp_wchar_t_bits == 8
-#define __glibcpp_wchar_t_min __glibcpp_u8_min
-#define __glibcpp_wchar_t_max __glibcpp_u8_max
-#define __glibcpp_wchar_t_digits __glibcpp_u8_digits
-#define __glibcpp_wchar_t_digits10 __glibcpp_u8_digits10
-#elif __glibcpp_wchar_t_bits == 16
-#define __glibcpp_wchar_t_min __glibcpp_u16_min
-#define __glibcpp_wchar_t_max __glibcpp_u16_max
-#define __glibcpp_wchar_t_digits __glibcpp_u16_digits
-#define __glibcpp_wchar_t_digits10 __glibcpp_u16_digits10
-#elif __glibcpp_wchar_t_bits == 32
-#define __glibcpp_wchar_t_min (wchar_t)__glibcpp_u32_min
-#define __glibcpp_wchar_t_max (wchar_t)__glibcpp_u32_max
-#define __glibcpp_wchar_t_digits __glibcpp_u32_digits
-#define __glibcpp_wchar_t_digits10 __glibcpp_u32_digits10
-#elif __glibcpp_wchar_t_bits == 64
-#define __glibcpp_wchar_t_min (wchar_t)__glibcpp_u64_min
-#define __glibcpp_wchar_t_max (wchar_t)__glibcpp_u64_max
-#define __glibcpp_wchar_t_digits __glibcpp_u64_digits
-#define __glibcpp_wchar_t_digits10 __glibcpp_u64_digits10
-#else
-// You must define these macros in the configuration file.
-#endif
-#endif
-
-// float
-//
-
-#if __glibcpp_float_bits == 32
-#define __glibcpp_float_min __glibcpp_f32_min
-#define __glibcpp_float_max __glibcpp_f32_max
-#define __glibcpp_float_digits __glibcpp_f32_digits
-#define __glibcpp_float_digits10 __glibcpp_f32_digits10
-#define __glibcpp_float_radix __glibcpp_f32_radix
-#define __glibcpp_float_epsilon __glibcpp_f32_epsilon
-#define __glibcpp_float_round_error __glibcpp_f32_round_error
-#define __glibcpp_float_min_exponent __glibcpp_f32_min_exponent
-#define __glibcpp_float_min_exponent10 __glibcpp_f32_min_exponent10
-#define __glibcpp_float_max_exponent __glibcpp_f32_max_exponent
-#define __glibcpp_float_max_exponent10 __glibcpp_f32_max_exponent10
-#elif __glibcpp_float_bits == 64
-#define __glibcpp_float_min __glibcpp_f64_min
-#define __glibcpp_float_max __glibcpp_f64_max
-#define __glibcpp_float_digits __glibcpp_f64_digits
-#define __glibcpp_float_digits10 __glibcpp_f64_digits10
-#define __glibcpp_float_radix __glibcpp_f64_radix
-#define __glibcpp_float_epsilon __glibcpp_f64_epsilon
-#define __glibcpp_float_round_error __glibcpp_f64_round_error
-#define __glibcpp_float_min_exponent __glibcpp_f64_min_exponent
-#define __glibcpp_float_min_exponent10 __glibcpp_f64_min_exponent10
-#define __glibcpp_float_max_exponent __glibcpp_f64_max_exponent
-#define __glibcpp_float_max_exponent10 __glibcpp_f64_max_exponent10
-#elif __glibcpp_float_bits == 80
-#define __glibcpp_float_min __glibcpp_f80_min
-#define __glibcpp_float_max __glibcpp_f80_max
-#define __glibcpp_float_digits __glibcpp_f80_digits
-#define __glibcpp_float_digits10 __glibcpp_f80_digits10
-#define __glibcpp_float_radix __glibcpp_f80_radix
-#define __glibcpp_float_epsilon __glibcpp_f80_epsilon
-#define __glibcpp_float_round_error __glibcpp_f80_round_error
-#define __glibcpp_float_min_exponent __glibcpp_f80_min_exponent
-#define __glibcpp_float_min_exponent10 __glibcpp_f80_min_exponent10
-#define __glibcpp_float_max_exponent __glibcpp_f80_max_exponent
-#define __glibcpp_float_max_exponent10 __glibcpp_f80_max_exponent10
-#else
-// You must define these macros in the configuration file.
-#endif
-
-// FIXME: These are just stubs and inkorrect
-
-#ifndef __glibcpp_float_has_infinity
-#define __glibcpp_float_has_infinity false
-#endif
-
-#ifndef __glibcpp_float_has_quiet_NaM
-#define __glibcpp_float_has_quiet_NaN false
-#endif
-
-#ifndef __glibcpp_float_has_signaling_NaN
-#define __glibcpp_float_has_signaling_NaN false
-#endif
-
-#ifndef __glibcpp_float_has_denorm
-#define __glibcpp_float_has_denorm denorm_absent
-#endif
-
-#ifndef __glibcpp_float_has_denorm_loss
-#define __glibcpp_float_has_denorm_loss false
-#endif
-
-#ifndef __glibcpp_float_infinity
-#define __glibcpp_float_infinity 0.0F
-#endif
-
-#ifndef __glibcpp_float_quiet_NaN
-#define __glibcpp_float_quiet_NaN 0.0F
-#endif
-
-#ifndef __glibcpp_float_signaling_NaN
-#define __glibcpp_float_signaling_NaN 0.0F
-#endif
-
-#ifndef __glibcpp_float_denorm_min
-#define __glibcpp_float_denorm_min 0.0F
-#endif
-
-#ifndef __glibcpp_float_is_iec559
-#define __glibcpp_float_is_iec559 false
-#endif
-
-#ifndef __glibcpp_float_is_bounded
-#define __glibcpp_float_is_bounded true
-#endif
-
-#ifndef __glibcpp_float_is_modulo
-#define __glibcpp_float_is_modulo false
-#endif
-
-#ifndef __glibcpp_float_traps
-#define __glibcpp_float_traps false
-#endif
-
-#ifndef __glibcpp_float_tinyness_before
-#define __glibcpp_float_tinyness_before false
-#endif
-
-#ifndef __glibcpp_float_round_style
-#define __glibcpp_float_round_style round_toward_zero
-#endif
-
-// double
-
-#if __glibcpp_double_bits == 32
-#define __glibcpp_double_min __glibcpp_f32_min
-#define __glibcpp_double_max __glibcpp_f32_max
-#define __glibcpp_double_digits __glibcpp_f32_digits
-#define __glibcpp_double_digits10 __glibcpp_f32_digits10
-#define __glibcpp_double_radix __glibcpp_f32_radix
-#define __glibcpp_double_epsilon __glibcpp_f32_epsilon
-#define __glibcpp_double_round_error __glibcpp_f32_round_error
-#define __glibcpp_double_min_exponent __glibcpp_f32_min_exponent
-#define __glibcpp_double_min_exponent10 __glibcpp_f32_min_exponent10
-#define __glibcpp_double_max_exponent __glibcpp_f32_max_exponent
-#define __glibcpp_double_max_exponent10 __glibcpp_f32_max_exponent10
-#elif __glibcpp_double_bits == 64
-#define __glibcpp_double_min __glibcpp_f64_min
-#define __glibcpp_double_max __glibcpp_f64_max
-#define __glibcpp_double_digits __glibcpp_f64_digits
-#define __glibcpp_double_digits10 __glibcpp_f64_digits10
-#define __glibcpp_double_radix __glibcpp_f64_radix
-#define __glibcpp_double_epsilon __glibcpp_f64_epsilon
-#define __glibcpp_double_round_error __glibcpp_f64_round_error
-#define __glibcpp_double_min_exponent __glibcpp_f64_min_exponent
-#define __glibcpp_double_min_exponent10 __glibcpp_f64_min_exponent10
-#define __glibcpp_double_max_exponent __glibcpp_f64_max_exponent
-#define __glibcpp_double_max_exponent10 __glibcpp_f64_max_exponent10
-#elif __glibcpp_double_bits == 80
-#define __glibcpp_double_min __glibcpp_f80_min
-#define __glibcpp_double_max __glibcpp_f80_max
-#define __glibcpp_double_digits __glibcpp_f80_digits
-#define __glibcpp_double_digits10 __glibcpp_f80_digits10
-#define __glibcpp_double_radix __glibcpp_f80_radix
-#define __glibcpp_double_epsilon __glibcpp_f80_epsilon
-#define __glibcpp_double_round_error __glibcpp_f80_round_error
-#define __glibcpp_double_min_exponent __glibcpp_f80_min_exponent
-#define __glibcpp_double_min_exponent10 __glibcpp_f80_min_exponent10
-#define __glibcpp_double_max_exponent __glibcpp_f80_max_exponent
-#define __glibcpp_double_max_exponent10 __glibcpp_f80_max_exponent10
-#else
-// You must define these macros in the configuration file.
-#endif
-
-// FIXME: These are just stubs and inkorrect
-
-#ifndef __glibcpp_double_has_infinity
-#define __glibcpp_double_has_infinity false
-#endif
-
-#ifndef __glibcpp_double_has_quiet_NaM
-#define __glibcpp_double_has_quiet_NaN false
-#endif
-
-#ifndef __glibcpp_double_has_signaling_NaN
-#define __glibcpp_double_has_signaling_NaN false
-#endif
-
-#ifndef __glibcpp_double_has_denorm
-#define __glibcpp_double_has_denorm denorm_absent
-#endif
-
-#ifndef __glibcpp_double_has_denorm_loss
-#define __glibcpp_double_has_denorm_loss false
-#endif
-
-#ifndef __glibcpp_double_infinity
-#define __glibcpp_double_infinity 0.0
-#endif
-
-#ifndef __glibcpp_double_quiet_NaN
-#define __glibcpp_double_quiet_NaN 0.0
-#endif
-
-#ifndef __glibcpp_double_signaling_NaN
-#define __glibcpp_double_signaling_NaN 0.0
-#endif
-
-#ifndef __glibcpp_double_denorm_min
-#define __glibcpp_double_denorm_min 0.0
-#endif
-
-#ifndef __glibcpp_double_is_iec559
-#define __glibcpp_double_is_iec559 false
-#endif
-
-#ifndef __glibcpp_double_is_bounded
-#define __glibcpp_double_is_bounded true
-#endif
-
-#ifndef __glibcpp_double_is_modulo
-#define __glibcpp_double_is_modulo false
-#endif
-
-#ifndef __glibcpp_double_traps
-#define __glibcpp_double_traps false
-#endif
-
-#ifndef __glibcpp_double_tinyness_before
-#define __glibcpp_double_tinyness_before false
-#endif
-
-#ifndef __glibcpp_double_round_style
-#define __glibcpp_double_round_style round_toward_zero
-#endif
-
-// long double
-
-#if __glibcpp_long_double_bits == 32
-#define __glibcpp_long_double_min __glibcpp_f32_min
-#define __glibcpp_long_double_max __glibcpp_f32_max
-#define __glibcpp_long_double_digits __glibcpp_f32_digits
-#define __glibcpp_long_double_digits10 __glibcpp_f32_digits10
-#define __glibcpp_long_double_radix __glibcpp_f32_radix
-#define __glibcpp_long_double_epsilon __glibcpp_f32_epsilon
-#define __glibcpp_long_double_round_error __glibcpp_f32_round_error
-#define __glibcpp_long_double_min_exponent __glibcpp_f32_min_exponent
-#define __glibcpp_long_double_min_exponent10 __glibcpp_f32_min_exponent10
-#define __glibcpp_long_double_max_exponent __glibcpp_f32_max_exponent
-#define __glibcpp_long_double_max_exponent10 __glibcpp_f32_max_exponent10
-#elif __glibcpp_long_double_bits == 64
-#define __glibcpp_long_double_min __glibcpp_f64_min
-#define __glibcpp_long_double_max __glibcpp_f64_max
-#define __glibcpp_long_double_digits __glibcpp_f64_digits
-#define __glibcpp_long_double_digits10 __glibcpp_f64_digits10
-#define __glibcpp_long_double_radix __glibcpp_f64_radix
-#define __glibcpp_long_double_epsilon __glibcpp_f64_epsilon
-#define __glibcpp_long_double_round_error __glibcpp_f64_round_error
-#define __glibcpp_long_double_min_exponent __glibcpp_f64_min_exponent
-#define __glibcpp_long_double_min_exponent10 __glibcpp_f64_min_exponent10
-#define __glibcpp_long_double_max_exponent __glibcpp_f64_max_exponent
-#define __glibcpp_long_double_max_exponent10 __glibcpp_f64_max_exponent10
-#elif __glibcpp_long_double_bits == 80
-#define __glibcpp_long_double_min __glibcpp_f80_min
-#define __glibcpp_long_double_max __glibcpp_f80_max
-#define __glibcpp_long_double_digits __glibcpp_f80_digits
-#define __glibcpp_long_double_digits10 __glibcpp_f80_digits10
-#define __glibcpp_long_double_radix __glibcpp_f80_radix
-#define __glibcpp_long_double_epsilon __glibcpp_f80_epsilon
-#define __glibcpp_long_double_round_error __glibcpp_f80_round_error
-#define __glibcpp_long_double_min_exponent __glibcpp_f80_min_exponent
-#define __glibcpp_long_double_min_exponent10 __glibcpp_f80_min_exponent10
-#define __glibcpp_long_double_max_exponent __glibcpp_f80_max_exponent
-#define __glibcpp_long_double_max_exponent10 __glibcpp_f80_max_exponent10
-#elif __glibcpp_long_double_bits == 96
-#define __glibcpp_long_double_min __glibcpp_f96_min
-#define __glibcpp_long_double_max __glibcpp_f96_max
-#define __glibcpp_long_double_digits __glibcpp_f96_digits
-#define __glibcpp_long_double_digits10 __glibcpp_f96_digits10
-#define __glibcpp_long_double_radix __glibcpp_f96_radix
-#define __glibcpp_long_double_epsilon __glibcpp_f96_epsilon
-#define __glibcpp_long_double_round_error __glibcpp_f96_round_error
-#define __glibcpp_long_double_min_exponent __glibcpp_f96_min_exponent
-#define __glibcpp_long_double_min_exponent10 __glibcpp_f96_min_exponent10
-#define __glibcpp_long_double_max_exponent __glibcpp_f96_max_exponent
-#define __glibcpp_long_double_max_exponent10 __glibcpp_f96_max_exponent10
-#elif __glibcpp_long_double_bits == 128
-#define __glibcpp_long_double_min __glibcpp_f128_min
-#define __glibcpp_long_double_max __glibcpp_f128_max
-#define __glibcpp_long_double_digits __glibcpp_f128_digits
-#define __glibcpp_long_double_digits10 __glibcpp_f128_digits10
-#define __glibcpp_long_double_radix __glibcpp_f128_radix
-#define __glibcpp_long_double_epsilon __glibcpp_f128_epsilon
-#define __glibcpp_long_double_round_error __glibcpp_f128_round_error
-#define __glibcpp_long_double_min_exponent __glibcpp_f128_min_exponent
-#define __glibcpp_long_double_min_exponent10 __glibcpp_f128_min_exponent10
-#define __glibcpp_long_double_max_exponent __glibcpp_f128_max_exponent
-#define __glibcpp_long_double_max_exponent10 __glibcpp_f128_max_exponent10
-#else
-// You must define these macros in the configuration file.
-#endif
-
-// FIXME: These are just stubs and inkorrect
-
-#ifndef __glibcpp_long_double_has_infinity
-#define __glibcpp_long_double_has_infinity false
-#endif
-
-#ifndef __glibcpp_long_double_has_quiet_NaN
-#define __glibcpp_long_double_has_quiet_NaN false
-#endif
-
-#ifndef __glibcpp_long_double_has_signaling_NaN
-#define __glibcpp_long_double_has_signaling_NaN false
-#endif
-
-#ifndef __glibcpp_long_double_has_denorm
-#define __glibcpp_long_double_has_denorm denorm_absent
-#endif
-
-#ifndef __glibcpp_long_double_has_denorm_loss
-#define __glibcpp_long_double_has_denorm_loss false
-#endif
-
-#ifndef __glibcpp_long_double_infinity
-#define __glibcpp_long_double_infinity 0.0L
-#endif
-
-#ifndef __glibcpp_long_double_quiet_NaN
-#define __glibcpp_long_double_quiet_NaN 0.0L
-#endif
-
-#ifndef __glibcpp_long_double_signaling_NaN
-#define __glibcpp_long_double_signaling_NaN 0.0L
-#endif
-
-#ifndef __glibcpp_long_double_denorm_min
-#define __glibcpp_long_double_denorm_min 0.0L
-#endif
-
-#ifndef __glibcpp_long_double_is_iec559
-#define __glibcpp_long_double_is_iec559 false
-#endif
-
-#ifndef __glibcpp_long_double_is_bounded
-#define __glibcpp_long_double_is_bounded true
-#endif
-
-#ifndef __glibcpp_long_double_is_modulo
-#define __glibcpp_long_double_is_modulo false
-#endif
-
-#ifndef __glibcpp_long_double_traps
-#define __glibcpp_long_double_traps false
-#endif
-
-#ifndef __glibcpp_long_double_tinyness_before
-#define __glibcpp_long_double_tinyness_before false
-#endif
-
-#ifndef __glibcpp_long_double_round_style
-#define __glibcpp_long_double_round_style round_toward_zero
-#endif
-
-
-namespace std
-{
-  enum float_round_style 
-  {
-    round_indeterminate       = -1,
-    round_toward_zero         = 0,
-    round_to_nearest          = 1,
-    round_toward_infinity     = 2,
-    round_toward_neg_infinity = 3
-  };
-
-  enum float_denorm_style 
-  {
-    denorm_indeterminate = -1,
-    denorm_absent        = 0,
-    denorm_present       = 1
-  };
-
-  //
-  // The primary class traits
-  //
-  template<typename _Tp> 
-    struct numeric_limits 
-    {
-      static const bool is_specialized = false;
-
-      static _Tp min() throw() { return static_cast<_Tp>(0); }
-      static _Tp max() throw() { return static_cast<_Tp>(0); }
-
-      static const int digits = 0;
-      static const int digits10 = 0;
-      static const bool is_signed = false;
-      static const bool is_integer = false;
-      static const bool is_exact = false;
-      static const int radix = 0;
-
-      static _Tp epsilon() throw() { return static_cast<_Tp>(0); }
-      static _Tp round_error() throw() { return static_cast<_Tp>(0); }
-
-      static const int min_exponent = 0;
-      static const int min_exponent10 = 0;
-      static const int max_exponent = 0;
-      static const int max_exponent10 = 0;
-
-      static const bool has_infinity = false;
-      static const bool has_quiet_NaN = false;
-      static const bool has_signaling_NaN = false;
-      static const float_denorm_style has_denorm = denorm_absent;
-      static const bool has_denorm_loss = false;
-
-      static _Tp infinity() throw()  { return static_cast<_Tp>(0); }
-      static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); }
-      static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); }
-      static _Tp denorm_min() throw() { return static_cast<_Tp>(0); }
-
-      static const bool is_iec559 = false;
-      static const bool is_bounded = false;
-      static const bool is_modulo = false;
-
-      static const bool traps = false;
-      static const bool tinyness_before = false;
-      static const float_round_style round_style = round_toward_zero;
-    };
-
-  template<typename _Tp> 
-    const bool
-    numeric_limits<_Tp>::is_specialized;
-
-  template<typename _Tp> 
-    const int
-    numeric_limits<_Tp>::digits;
-
-  template<typename _Tp> 
-    const int
-    numeric_limits<_Tp>::digits10;
-
-  template<typename _Tp> 
-    const bool
-    numeric_limits<_Tp>::is_signed;
-
-  template<typename _Tp> 
-    const bool
-    numeric_limits<_Tp>::is_integer;
-
-  template<typename _Tp> 
-    const bool
-    numeric_limits<_Tp>::is_exact;
-
-  template<typename _Tp> 
-    const int
-    numeric_limits<_Tp>::radix;
-
-  template<typename _Tp> 
-    const int
-    numeric_limits<_Tp>::min_exponent;
-
-  template<typename _Tp> 
-    const int
-    numeric_limits<_Tp>::min_exponent10;
-
-  template<typename _Tp> 
-    const int
-    numeric_limits<_Tp>::max_exponent;
-
-  template<typename _Tp> 
-    const int
-    numeric_limits<_Tp>::max_exponent10;
-
-  template<typename _Tp> 
-    const bool
-    numeric_limits<_Tp>::has_infinity;
-
-  template<typename _Tp> 
-    const bool
-    numeric_limits<_Tp>::has_quiet_NaN;
-
-  template<typename _Tp> 
-    const bool
-    numeric_limits<_Tp>::has_signaling_NaN;
-
-  template<typename _Tp> 
-    const float_denorm_style
-    numeric_limits<_Tp>::has_denorm;
-
-  template<typename _Tp> 
-    const bool
-    numeric_limits<_Tp>::has_denorm_loss;
-
-  template<typename _Tp> 
-    const bool
-    numeric_limits<_Tp>::is_iec559;
-
-  template<typename _Tp> 
-    const bool
-    numeric_limits<_Tp>::is_bounded;
-
-  template<typename _Tp> 
-    const bool
-    numeric_limits<_Tp>::is_modulo;
-
-  template<typename _Tp> 
-    const bool
-    numeric_limits<_Tp>::traps;
-
-  template<typename _Tp> 
-    const bool
-    numeric_limits<_Tp>::tinyness_before;
-
-  template<typename _Tp> 
-    const float_round_style
-    numeric_limits<_Tp>::round_style;
-
-  // Now there follow 15 explicit specializations.  Yes, 15.  Make sure
-  // you get the count right.
-  
-  template<>
-    struct numeric_limits<bool>
-    {
-      static const bool is_specialized = true;
-
-      static bool min() throw()
-      { return false; }
-
-      static bool max() throw()
-      { return true; }
-
-      static const int digits = __glibcpp_bool_digits;
-      static const int digits10 = 0;
-      static const bool is_signed = false;
-      static const bool is_integer = true;
-      static const bool is_exact = true;
-      static const int radix = 2;
-      static bool epsilon() throw()
-      { return false; }
-      static bool round_error() throw()
-      { return false; }
-
-      static const int min_exponent = 0;
-      static const int min_exponent10 = 0;
-      static const int max_exponent = 0;
-      static const int max_exponent10 = 0;
-
-      static const bool has_infinity = false;
-      static const bool has_quiet_NaN = false;
-      static const bool has_signaling_NaN = false;
-      static const float_denorm_style has_denorm = denorm_absent;
-      static const bool has_denorm_loss = false;
-
-      static bool infinity() throw()
-      { return false; }
-      static bool quiet_NaN() throw()
-      { return false; }
-      static bool signaling_NaN() throw()
-      { return false; }
-      static bool denorm_min() throw()
-      { return false; }
-
-      static const bool is_iec559 = true;
-      static const bool is_bounded = true;
-      static const bool is_modulo = true;
-
-      // It is not clear what it means for a boolean type to trap.
-      // This is a DR on the LWG issue list.  Here, I use integer
-      // promotion semantics.
-      static const bool traps = __glibcpp_signed_int_traps
-               || __glibcpp_signed_long_traps;
-      static const bool tinyness_before = false;
-      static const float_round_style round_style = round_toward_zero;
-    };
-
-#undef __glibcpp_bool_digits  
-  
-  template<>
-    struct numeric_limits<char>
-    {
-      static const bool is_specialized = true;
-
-      static char min() throw()
-      { return __glibcpp_char_min; }
-      static char max() throw()
-      { return __glibcpp_char_max; }
-
-      static const int digits = __glibcpp_char_digits;
-      static const int digits10 = __glibcpp_char_digits10;
-      static const bool is_signed = __glibcpp_plain_char_is_signed;
-      static const bool is_integer = true;
-      static const bool is_exact = true;
-      static const int radix = 2;
-      static char epsilon() throw()
-      { return char(); }
-      static char round_error() throw()
-      { return char(); }
-
-      static const int min_exponent = 0;
-      static const int min_exponent10 = 0;
-      static const int max_exponent = 0;
-      static const int max_exponent10 = 0;
-
-      static const bool has_infinity = false;
-      static const bool has_quiet_NaN = false;
-      static const bool has_signaling_NaN = false;
-      static const float_denorm_style has_denorm = denorm_absent;
-      static const bool has_denorm_loss = false;
-
-      static char infinity() throw()
-      { return char(); }
-      static char quiet_NaN() throw()
-      { return char(); }
-      static char signaling_NaN() throw()
-      { return char(); }
-      static char denorm_min() throw()
-      { return static_cast<char>(0); }
-
-      static const bool is_iec559 = false;
-      static const bool is_bounded = true;
-      static const bool is_modulo = __glibcpp_char_is_modulo;
-
-      static const bool traps = __glibcpp_char_traps;
-      static const bool tinyness_before = false;
-      static const float_round_style round_style = round_toward_zero;
-    };
-
-#undef __glibcpp_char_min
-#undef __glibcpp_char_max  
-#undef __glibcpp_char_digits
-#undef __glibcpp_char_digits10
-#undef __glibcpp_char_is_signed
-#undef __glibcpp_char_is_modulo
-#undef __glibcpp_char_traps
-
-
-
-  template<>
-    struct numeric_limits<signed char>
-    {
-      static const bool is_specialized = true;
-
-      static signed char min() throw()
-      { return __glibcpp_signed_char_min; }
-      static signed char max() throw()
-      { return __glibcpp_signed_char_max; }
-
-      static const int digits = __glibcpp_signed_char_digits;
-      static const int digits10 = __glibcpp_signed_char_digits10;
-      static const bool is_signed = true;
-      static const bool is_integer = true;
-      static const bool is_exact = true;
-      static const int radix = 2;
-      static signed char epsilon() throw()
-      { return 0; }
-      static signed char round_error() throw()
-      { return 0; }
-
-      static const int min_exponent = 0;
-      static const int min_exponent10 = 0;
-      static const int max_exponent = 0;
-      static const int max_exponent10 = 0;
-
-      static const bool has_infinity = false;
-      static const bool has_quiet_NaN = false;
-      static const bool has_signaling_NaN = false;
-      static const float_denorm_style has_denorm = denorm_absent;
-      static const bool has_denorm_loss = false;
-
-      static signed char infinity() throw()
-      { return static_cast<signed char>(0); }
-      static signed char quiet_NaN() throw()
-      { return static_cast<signed char>(0); }
-      static signed char signaling_NaN() throw()
-      { return static_cast<signed char>(0); }
-      static signed char denorm_min() throw()
-      { return static_cast<signed char>(0); }
-
-      static const bool is_iec559 = false;
-      static const bool is_bounded = true;
-      static const bool is_modulo = __glibcpp_signed_char_is_modulo;
-
-      static const bool traps = __glibcpp_signed_char_traps;
-      static const bool tinyness_before = false;
-      static const float_round_style round_style = round_toward_zero;
-    };
-
-#undef __glibcpp_signed_char_min
-#undef __glibcpp_signed_char_max
-#undef __glibcpp_signed_char_digits
-#undef __glibcpp_signed_char_digits10
-#undef __glibcpp_signed_char_is_modulo  
-#undef __glibcpp_signed_char_traps  
-
-  template<>
-    struct numeric_limits<unsigned char>
-    {
-      static const bool is_specialized = true;
-
-      static unsigned char min() throw()
-      { return 0; }
-      static unsigned char max() throw()
-      { return __glibcpp_unsigned_char_max; }
-
-      static const int digits = __glibcpp_unsigned_char_digits;
-      static const int digits10 = __glibcpp_unsigned_char_digits10;
-      static const bool is_signed = false;
-      static const bool is_integer = true;
-      static const bool is_exact = true;
-      static const int radix = 2;
-      static unsigned char epsilon() throw()
-      { return 0; }
-      static unsigned char round_error() throw()
-      { return 0; }
-
-      static const int min_exponent = 0;
-      static const int min_exponent10 = 0;
-      static const int max_exponent = 0;
-      static const int max_exponent10 = 0;
-
-      static const bool has_infinity = false;
-      static const bool has_quiet_NaN = false;
-      static const bool has_signaling_NaN = false;
-      static const float_denorm_style has_denorm = denorm_absent;
-      static const bool has_denorm_loss = false;
-
-      static unsigned char infinity() throw()
-      { return static_cast<unsigned char>(0); }
-      static unsigned char quiet_NaN() throw()
-      { return static_cast<unsigned char>(0); }
-      static unsigned char signaling_NaN() throw()
-      { return static_cast<unsigned char>(0); }
-      static unsigned char denorm_min() throw()
-      { return static_cast<unsigned char>(0); }
-
-      static const bool is_iec559 = false;
-      static const bool is_bounded = true;
-      static const bool is_modulo = true;
-
-      static const bool traps = __glibcpp_unsigned_char_traps;
-      static const bool tinyness_before = false;
-      static const float_round_style round_style = round_toward_zero;
-    };
-
-#undef __glibcpp_unsigned_char_max
-#undef __glibcpp_unsigned_char_digits
-#undef __glibcpp_unsigned_char_digits10
-#undef __glibcpp_unsigned_char_traps  
-
-  template<>
-    struct numeric_limits<wchar_t>
-    {
-      static const bool is_specialized = true;
-
-      static wchar_t min() throw()
-      { return __glibcpp_wchar_t_min; }
-      static wchar_t max() throw()
-      { return __glibcpp_wchar_t_max; }
-
-      static const int digits = __glibcpp_wchar_t_digits;
-      static const int digits10 = __glibcpp_wchar_t_digits10;
-      static const bool is_signed = __glibcpp_wchar_t_is_signed;
-      static const bool is_integer = true;
-      static const bool is_exact = true;
-      static const int radix = 2;
-      static wchar_t epsilon() throw()
-      { return 0; }
-      static wchar_t round_error() throw()
-      { return 0; }
-
-      static const int min_exponent = 0;
-      static const int min_exponent10 = 0;
-      static const int max_exponent = 0;
-      static const int max_exponent10 = 0;
-
-      static const bool has_infinity = false;
-      static const bool has_quiet_NaN = false;
-      static const bool has_signaling_NaN = false;
-      static const float_denorm_style has_denorm = denorm_absent;
-      static const bool has_denorm_loss = false;
-
-      static wchar_t infinity() throw()
-      { return wchar_t(); }
-      static wchar_t quiet_NaN() throw()
-      { return wchar_t(); }
-      static wchar_t signaling_NaN() throw()
-      { return wchar_t(); }
-      static wchar_t denorm_min() throw()
-      { return wchar_t(); }
-
-      static const bool is_iec559 = false;
-      static const bool is_bounded = true;
-      static const bool is_modulo = __glibcpp_wchar_t_is_modulo;
-
-      static const bool traps = __glibcpp_wchar_t_traps;
-      static const bool tinyness_before = false;
-      static const float_round_style round_style = round_toward_zero;
-    };
-
-#undef __glibcpp_wchar_t_min
-#undef __glibcpp_wchar_t_max
-#undef __glibcpp_wchar_t_digits
-#undef __glibcpp_wchar_t_digits10  
-#undef __glibcpp_wchar_t_is_signed
-#undef __glibcpp_wchar_t_is_modulo
-#undef __glibcpp_wchar_t_traps  
-  
-  template<>
-    struct numeric_limits<short>
-    {
-      static const bool is_specialized = true;
-
-      static short min() throw()
-      { return __glibcpp_signed_short_min; }
-      static short max() throw()
-      { return __glibcpp_signed_short_max; }
-
-      static const int digits = __glibcpp_signed_short_digits;
-      static const int digits10 = __glibcpp_signed_short_digits10;
-      static const bool is_signed = true;
-      static const bool is_integer = true;
-      static const bool is_exact = true;
-      static const int radix = 2;
-      static short epsilon() throw()
-      { return 0; }
-      static short round_error() throw()
-      { return 0; }
-
-      static const int min_exponent = 0;
-      static const int min_exponent10 = 0;
-      static const int max_exponent = 0;
-      static const int max_exponent10 = 0;
-
-      static const bool has_infinity = false;
-      static const bool has_quiet_NaN = false;
-      static const bool has_signaling_NaN = false;
-      static const float_denorm_style has_denorm = denorm_absent;
-      static const bool has_denorm_loss = false;
-
-      static short infinity() throw()
-      { return short(); }
-      static short quiet_NaN() throw()
-      { return short(); }
-      static short signaling_NaN() throw()
-      { return short(); }
-      static short denorm_min() throw()
-      { return short(); }
-
-      static const bool is_iec559 = true;
-      static const bool is_bounded = true;
-      static const bool is_modulo = __glibcpp_signed_short_is_modulo;
-
-      static const bool traps = __glibcpp_signed_short_traps;
-      static const bool tinyness_before = false;
-      static const float_round_style round_style = round_toward_zero;
-    };
-
-#undef __glibcpp_signed_short_min
-#undef __glibcpp_signed_short_max
-#undef __glibcpp_signed_short_digits
-#undef __glibcpp_signed_short_digits10
-#undef __glibcpp_signed_short_is_modulo
-#undef __glibcpp_signed_short_traps  
-  
-  template<>
-    struct numeric_limits<unsigned short>
-    {
-      static const bool is_specialized = true;
-
-      static unsigned short min() throw()
-      { return 0; }
-      static unsigned short max() throw()
-      { return __glibcpp_unsigned_short_max; }
-
-      static const int digits = __glibcpp_unsigned_short_digits;
-      static const int digits10 = __glibcpp_unsigned_short_digits10;
-      static const bool is_signed = false;
-      static const bool is_integer = true;
-      static const bool is_exact = true;
-      static const int radix = 2;
-      static unsigned short epsilon() throw()
-      { return 0; }
-      static unsigned short round_error() throw()
-      { return 0; }
-
-      static const int min_exponent = 0;
-      static const int min_exponent10 = 0;
-      static const int max_exponent = 0;
-      static const int max_exponent10 = 0;
-
-      static const bool has_infinity = false;
-      static const bool has_quiet_NaN = false;
-      static const bool has_signaling_NaN = false;
-      static const float_denorm_style has_denorm = denorm_absent;
-      static const bool has_denorm_loss = false;
-
-      static unsigned short infinity() throw()
-      { return static_cast<unsigned short>(0); }
-      static unsigned short quiet_NaN() throw()
-      { return static_cast<unsigned short>(0); }
-      static unsigned short signaling_NaN() throw()
-      { return static_cast<unsigned short>(0); }
-      static unsigned short denorm_min() throw()
-      { return static_cast<unsigned short>(0); }
-
-      static const bool is_iec559 = true;
-      static const bool is_bounded = true;
-      static const bool is_modulo = true;
-
-      static const bool traps = __glibcpp_unsigned_short_traps;
-      static const bool tinyness_before = false;
-      static const float_round_style round_style = round_toward_zero;
-    };
-
-#undef __glibcpp_unsigned_short_max
-#undef __glibcpp_unsigned_short_digits
-#undef __glibcpp_unsigned_short_digits10
-#undef __glibcpp_unsigned_short_traps  
-  
-  template<>
-    struct numeric_limits<int>
-    {
-      static const bool is_specialized = true;
-
-      static int min() throw()
-      { return __glibcpp_signed_int_min; }
-      static int max() throw()
-      { return __glibcpp_signed_int_max; }
-
-      static const int digits = __glibcpp_signed_int_digits;
-      static const int digits10 = __glibcpp_signed_int_digits10;
-      static const bool is_signed = true;
-      static const bool is_integer = true;
-      static const bool is_exact = true;
-      static const int radix = 2;
-      static int epsilon() throw()
-      { return 0; }
-      static int round_error() throw()
-      { return 0; }
-
-      static const int min_exponent = 0;
-      static const int min_exponent10 = 0;
-      static const int max_exponent = 0;
-      static const int max_exponent10 = 0;
-
-      static const bool has_infinity = false;
-      static const bool has_quiet_NaN = false;
-      static const bool has_signaling_NaN = false;
-      static const float_denorm_style has_denorm = denorm_absent;
-      static const bool has_denorm_loss = false;
-
-      static int infinity() throw()
-      { return static_cast<int>(0); }
-      static int quiet_NaN() throw()
-      { return static_cast<int>(0); }
-      static int signaling_NaN() throw()
-      { return static_cast<int>(0); }
-      static int denorm_min() throw()
-      { return static_cast<int>(0); }
-
-      static const bool is_iec559 = true;
-      static const bool is_bounded = true;
-      static const bool is_modulo = __glibcpp_signed_int_is_modulo;
-
-      static const bool traps = __glibcpp_signed_int_traps;
-      static const bool tinyness_before = false;
-      static const float_round_style round_style = round_toward_zero;
-    };
-
-#undef __glibcpp_signed_int_min
-#undef __glibcpp_signed_int_max
-#undef __glibcpp_signed_int_digits
-#undef __glibcpp_signed_int_digits10
-#undef __glibcpp_signed_int_is_modulo
-#undef __glibcpp_signed_int_traps  
-  
-  template<>
-    struct numeric_limits<unsigned int>
-    {
-      static const bool is_specialized = true;
-
-      static unsigned int min() throw()
-      { return 0; }
-          static unsigned int max() throw()
-      { return __glibcpp_unsigned_int_max; }
-
-      static const int digits = __glibcpp_unsigned_int_digits;
-      static const int digits10 = __glibcpp_unsigned_int_digits10;
-      static const bool is_signed = false;
-      static const bool is_integer = true;
-      static const bool is_exact = true;
-      static const int radix = 2;
-      static unsigned int epsilon() throw()
-      { return 0; }
-      static unsigned int round_error() throw()
-      { return 0; }
-
-      static const int min_exponent = 0;
-      static const int min_exponent10 = 0;
-      static const int max_exponent = 0;
-      static const int max_exponent10 = 0;
-
-      static const bool has_infinity = false;
-      static const bool has_quiet_NaN = false;
-      static const bool has_signaling_NaN = false;
-      static const float_denorm_style has_denorm = denorm_absent;
-      static const bool has_denorm_loss = false;
-
-      static unsigned int infinity() throw()
-      { return static_cast<unsigned int>(0); }
-      static unsigned int quiet_NaN() throw()
-      { return static_cast<unsigned int>(0); }
-      static unsigned int signaling_NaN() throw()
-      { return static_cast<unsigned int>(0); }
-      static unsigned int denorm_min() throw()
-      { return static_cast<unsigned int>(0); }
-
-      static const bool is_iec559 = true;
-      static const bool is_bounded = true;
-      static const bool is_modulo = true;
-
-      static const bool traps = __glibcpp_unsigned_int_traps;
-      static const bool tinyness_before = false;
-      static const float_round_style round_style = round_toward_zero;
-    };
-
-#undef __glibcpp_unsigned_int_max
-#undef __glibcpp_unsigned_int_digits
-#undef __glibcpp_unsigned_int_digits10
-#undef __glibcpp_unsigned_int_traps  
-
-  template<>
-    struct numeric_limits<long>
-    {
-      static const bool is_specialized = true;
-
-      static long min() throw()
-      { return __glibcpp_signed_long_min; }
-      static long max() throw()
-      { return __glibcpp_signed_long_max; }
-
-      static const int digits = __glibcpp_signed_long_digits;
-      static const int digits10 = __glibcpp_signed_long_digits10;
-      static const bool is_signed = true;
-      static const bool is_integer = true;
-      static const bool is_exact = true;
-      static const int radix = 2;
-      static long epsilon() throw()
-      { return 0; }
-      static long round_error() throw()
-      { return 0; }
-
-      static const int min_exponent = 0;
-      static const int min_exponent10 = 0;
-      static const int max_exponent = 0;
-      static const int max_exponent10 = 0;
-
-      static const bool has_infinity = false;
-      static const bool has_quiet_NaN = false;
-      static const bool has_signaling_NaN = false;
-      static const float_denorm_style has_denorm = denorm_absent;
-      static const bool has_denorm_loss = false;
-
-      static long infinity() throw()
-      { return static_cast<long>(0); }
-      static long quiet_NaN() throw()
-      { return static_cast<long>(0); }
-      static long signaling_NaN() throw()
-      { return static_cast<long>(0); }
-      static long denorm_min() throw()
-      { return static_cast<long>(0); }
-
-      static const bool is_iec559 = true;
-      static const bool is_bounded = true;
-      static const bool is_modulo = __glibcpp_signed_long_is_modulo;
-
-      static const bool traps = __glibcpp_signed_long_traps;
-      static const bool tinyness_before = false;
-      static const float_round_style round_style = round_toward_zero;
-    };
-
-#undef __glibcpp_signed_long_min
-#undef __glibcpp_signed_long_max
-#undef __glibcpp_signed_long_digits
-#undef __glibcpp_signed_long_digits10
-#undef __glibcpp_signed_long_is_modulo
-#undef __glibcpp_signed_long_traps  
-  
-  template<>
-    struct numeric_limits<unsigned long>
-    {
-      static const bool is_specialized = true;
-
-      static unsigned long min() throw()
-      { return 0; }
-      static unsigned long max() throw()
-      { return __glibcpp_unsigned_long_max; }
-
-      static const int digits = __glibcpp_unsigned_long_digits;
-      static const int digits10 = __glibcpp_unsigned_long_digits10;
-      static const bool is_signed = false;
-      static const bool is_integer = true;
-      static const bool is_exact = true;
-      static const int radix = 2;
-      static unsigned long epsilon() throw()
-      { return 0; }
-      static unsigned long round_error() throw()
-      { return 0; }
-
-      static const int min_exponent = 0;
-      static const int min_exponent10 = 0;
-      static const int max_exponent = 0;
-      static const int max_exponent10 = 0;
-
-      static const bool has_infinity = false;
-      static const bool has_quiet_NaN = false;
-      static const bool has_signaling_NaN = false;
-      static const float_denorm_style has_denorm = denorm_absent;
-      static const bool has_denorm_loss = false;
-
-      static unsigned long infinity() throw()
-      { return static_cast<unsigned long>(0); }
-      static unsigned long quiet_NaN() throw()
-      { return static_cast<unsigned long>(0); }
-      static unsigned long signaling_NaN() throw()
-      { return static_cast<unsigned long>(0); }
-      static unsigned long denorm_min() throw()
-      { return static_cast<unsigned long>(0); }
-
-      static const bool is_iec559 = true;
-      static const bool is_bounded = true;
-      static const bool is_modulo = true;
-
-      static const bool traps = __glibcpp_unsigned_long_traps;
-      static const bool tinyness_before = false;
-      static const float_round_style round_style = round_toward_zero;
-    };
-
-#undef __glibcpp_unsigned_long_max
-#undef __glibcpp_unsigned_long_digits
-#undef __glibcpp_unsigned_long_digits10
-#undef __glibcpp_unsigned_long_traps  
-
-  template<>
-    struct numeric_limits<long long>
-    {
-      static const bool is_specialized = true;
-      
-      static long long min() throw()
-      { return __glibcpp_signed_long_long_min; }
-      static long long max() throw()
-      { return __glibcpp_signed_long_long_max; }
-      
-      static const int digits = __glibcpp_signed_long_long_digits;
-      static const int digits10 = __glibcpp_signed_long_long_digits10;
-      static const bool is_signed = true;
-      static const bool is_integer = true;
-      static const bool is_exact = true;
-      static const int radix = 2;
-      static long long epsilon() throw()
-      { return 0; }
-      static long long round_error() throw()
-      { return 0; }
-      
-      static const int min_exponent = 0;
-      static const int min_exponent10 = 0;
-      static const int max_exponent = 0;
-      static const int max_exponent10 = 0;
-      
-      static const bool has_infinity = false;
-      static const bool has_quiet_NaN = false;
-      static const bool has_signaling_NaN = false;
-      static const float_denorm_style has_denorm = denorm_absent;
-      static const bool has_denorm_loss = false;
-      
-      static long long infinity() throw()
-      { return static_cast<long long>(0); }
-      static long long quiet_NaN() throw()
-      { return static_cast<long long>(0); }
-      static long long signaling_NaN() throw()
-      { return static_cast<long long>(0); }
-      static long long denorm_min() throw()
-      { return static_cast<long long>(0); }
-      
-      static const bool is_iec559 = true;
-      static const bool is_bounded = true;
-      static const bool is_modulo = __glibcpp_signed_long_long_is_modulo;
-
-      static const bool traps = __glibcpp_signed_long_long_traps;
-      static const bool tinyness_before = false;
-      static const float_round_style round_style = round_toward_zero;
-    };
-
-#undef __glibcpp_signed_long_long_min
-#undef __glibcpp_signed_long_long_max
-#undef __glibcpp_signed_long_long_digits
-#undef __glibcpp_signed_long_long_digits10
-#undef __glibcpp_signed_long_long_is_modulo
-#undef __glibcpp_signed_long_long_traps  
-  
-  template<>
-    struct numeric_limits<unsigned long long>
-    {
-      static const bool is_specialized = true;
-
-      static unsigned long long min() throw()
-      { return 0; }
-      static unsigned long long max() throw()
-      { return __glibcpp_unsigned_long_long_max; }
-
-      static const int digits = __glibcpp_unsigned_long_long_digits;
-      static const int digits10 = __glibcpp_unsigned_long_long_digits10;
-      static const bool is_signed = false;
-      static const bool is_integer = true;
-      static const bool is_exact = true;
-      static const int radix = 2;
-      static unsigned long long epsilon() throw()
-      { return 0; }
-      static unsigned long long round_error() throw()
-      { return 0; }
-
-      static const int min_exponent = 0;
-      static const int min_exponent10 = 0;
-      static const int max_exponent = 0;
-      static const int max_exponent10 = 0;
-
-      static const bool has_infinity = false;
-      static const bool has_quiet_NaN = false;
-      static const bool has_signaling_NaN = false;
-      static const float_denorm_style has_denorm = denorm_absent;
-      static const bool has_denorm_loss = false;
-
-      static unsigned long long infinity() throw()
-      { return static_cast<unsigned long long>(0); }
-      static unsigned long long quiet_NaN() throw()
-      { return static_cast<unsigned long long>(0); }
-      static unsigned long long signaling_NaN() throw()
-      { return static_cast<unsigned long long>(0); }
-      static unsigned long long denorm_min() throw()
-      { return static_cast<unsigned long long>(0); }
-
-      static const bool is_iec559 = true;
-      static const bool is_bounded = true;
-      static const bool is_modulo = true;
-
-      static const bool traps = true;
-      static const bool tinyness_before = false;
-      static const float_round_style round_style = round_toward_zero;
-    };
-
-#undef __glibcpp_unsigned_long_long_max
-#undef __glibcpp_unsigned_long_long_digits
-#undef __glibcpp_unsigned_long_long_digits10
-#undef __glibcpp_unsigned_long_long_traps  
-
-  template<>
-    struct numeric_limits<float>
-    {
-      static const bool is_specialized = true;
-
-      static float min() throw()
-      { return __glibcpp_float_min; }
-      static float max() throw()
-      { return __glibcpp_float_max; }
-
-      static const int digits = __glibcpp_float_digits;
-      static const int digits10 = __glibcpp_float_digits10;
-      static const bool is_signed = true;
-      static const bool is_integer = false;
-      static const bool is_exact = false;
-      static const int radix = __glibcpp_float_radix;
-      static float epsilon() throw()
-      { return __glibcpp_float_epsilon; }
-      static float round_error() throw()
-      { return __glibcpp_float_round_error; }
-
-      static const int min_exponent = __glibcpp_float_min_exponent;
-      static const int min_exponent10 = __glibcpp_float_min_exponent10;
-      static const int max_exponent = __glibcpp_float_max_exponent;
-      static const int max_exponent10 = __glibcpp_float_max_exponent10;
-
-      static const bool has_infinity = __glibcpp_float_has_infinity;
-      static const bool has_quiet_NaN = __glibcpp_float_has_quiet_NaN;
-      static const bool has_signaling_NaN = __glibcpp_float_has_signaling_NaN;
-      static const float_denorm_style has_denorm = __glibcpp_float_has_denorm;
-      static const bool has_denorm_loss = __glibcpp_float_has_denorm_loss;
-
-      static float infinity() throw()
-      { return __glibcpp_float_infinity; }
-      static float quiet_NaN() throw()
-      { return __glibcpp_float_quiet_NaN; }
-      static float signaling_NaN() throw()
-      { return __glibcpp_float_signaling_NaN; }
-      static float denorm_min() throw()
-      { return __glibcpp_float_denorm_min; }
-
-      static const bool is_iec559 = __glibcpp_float_is_iec559;
-      static const bool is_bounded = __glibcpp_float_is_bounded;
-      static const bool is_modulo = __glibcpp_float_is_modulo;
-
-      static const bool traps = __glibcpp_float_traps;
-      static const bool tinyness_before = __glibcpp_float_tinyness_before;
-      static const float_round_style round_style = __glibcpp_float_round_style;
-    };
-
-#undef __glibcpp_float_min
-#undef __glibcpp_float_max
-#undef __glibcpp_float_digits
-#undef __glibcpp_float_digits10
-#undef __glibcpp_float_radix
-#undef __glibcpp_float_round_error
-#undef __glibcpp_float_min_exponent
-#undef __glibcpp_float_min_exponent10
-#undef __glibcpp_float_max_exponent
-#undef __glibcpp_float_max_exponent10
-#undef __glibcpp_float_has_infinity
-#undef __glibcpp_float_has_quiet_NaN
-#undef __glibcpp_float_has_signaling_NaN
-#undef __glibcpp_float_has_denorm
-#undef __glibcpp_float_has_denorm_loss
-#undef __glibcpp_float_infinity
-#undef __glibcpp_float_quiet_NaN
-#undef __glibcpp_float_signaling_NaN
-#undef __glibcpp_float_denorm_min
-#undef __glibcpp_float_is_iec559
-#undef __glibcpp_float_is_bounded
-#undef __glibcpp_float_is_modulo
-#undef __glibcpp_float_traps
-#undef __glibcpp_float_tinyness_before
-#undef __glibcpp_float_round_style  
-
-  template<>
-    struct numeric_limits<double>
-    {
-      static const bool is_specialized = true;
-
-      static double min() throw()
-      { return __glibcpp_double_min; }
-      static double max() throw()
-      { return __glibcpp_double_max; }
-
-      static const int digits = __glibcpp_double_digits;
-      static const int digits10 = __glibcpp_double_digits10;
-      static const bool is_signed = true;
-      static const bool is_integer = false;
-      static const bool is_exact = false;
-      static const int radix = __glibcpp_double_radix;
-      static double epsilon() throw()
-      { return __glibcpp_double_epsilon; }
-      static double round_error() throw()
-      { return __glibcpp_double_round_error; }
-
-      static const int min_exponent = __glibcpp_double_min_exponent;
-      static const int min_exponent10 = __glibcpp_double_min_exponent10;
-      static const int max_exponent = __glibcpp_double_max_exponent;
-      static const int max_exponent10 = __glibcpp_double_max_exponent10;
-
-      static const bool has_infinity = __glibcpp_double_has_infinity;
-      static const bool has_quiet_NaN = __glibcpp_double_has_quiet_NaN;
-      static const bool has_signaling_NaN = __glibcpp_double_has_signaling_NaN;
-      static const float_denorm_style has_denorm =
-              __glibcpp_double_has_denorm;
-      static const bool has_denorm_loss = __glibcpp_double_has_denorm_loss;
-
-      static double infinity() throw()
-      { return __glibcpp_double_infinity; }
-      static double quiet_NaN() throw()
-      { return __glibcpp_double_quiet_NaN; }
-      static double signaling_NaN() throw()
-      { return __glibcpp_double_signaling_NaN; }
-      static double denorm_min() throw()
-      { return __glibcpp_double_denorm_min; }
-
-      static const bool is_iec559 = __glibcpp_double_is_iec559;
-      static const bool is_bounded = __glibcpp_double_is_bounded;
-      static const bool is_modulo = __glibcpp_double_is_modulo;
-
-      static const bool traps = __glibcpp_double_traps;
-      static const bool tinyness_before = __glibcpp_double_tinyness_before;
-      static const float_round_style round_style =
-              __glibcpp_double_round_style;
-    };
-
-#undef __glibcpp_double_min
-#undef __glibcpp_double_max
-#undef __glibcpp_double_digits
-#undef __glibcpp_double_digits10
-#undef __glibcpp_double_radix
-#undef __glibcpp_double_round_error
-#undef __glibcpp_double_min_exponent
-#undef __glibcpp_double_min_exponent10
-#undef __glibcpp_double_max_exponent
-#undef __glibcpp_double_max_exponent10
-#undef __glibcpp_double_has_infinity
-#undef __glibcpp_double_has_quiet_NaN
-#undef __glibcpp_double_has_signaling_NaN
-#undef __glibcpp_double_has_denorm
-#undef __glibcpp_double_has_denorm_loss
-#undef __glibcpp_double_infinity
-#undef __glibcpp_double_quiet_NaN
-#undef __glibcpp_double_signaling_NaN
-#undef __glibcpp_double_denorm_min
-#undef __glibcpp_double_is_iec559
-#undef __glibcpp_double_is_bounded
-#undef __glibcpp_double_is_modulo
-#undef __glibcpp_double_traps
-#undef __glibcpp_double_tinyness_before
-#undef __glibcpp_double_round_style  
-  
-  
-  template<>
-    struct numeric_limits<long double>
-    {
-      static const bool is_specialized = true;
-
-      static long double min() throw()
-      { return __glibcpp_long_double_min; }
-      static long double max() throw()
-      { return __glibcpp_long_double_max; }
-
-      static const int digits = __glibcpp_long_double_digits;
-      static const int digits10 = __glibcpp_long_double_digits10;
-      static const bool is_signed = true;
-      static const bool is_integer = false;
-      static const bool is_exact = false;
-      static const int radix = __glibcpp_long_double_radix;
-      static long double epsilon() throw()
-      { return __glibcpp_long_double_epsilon; }
-      static long double round_error() throw()
-      { return __glibcpp_long_double_round_error; }
-
-      static const int min_exponent = __glibcpp_long_double_min_exponent;
-      static const int min_exponent10 = __glibcpp_long_double_min_exponent10;
-      static const int max_exponent = __glibcpp_long_double_max_exponent;
-      static const int max_exponent10 = __glibcpp_long_double_max_exponent10;
-
-      static const bool has_infinity = __glibcpp_long_double_has_infinity;
-      static const bool has_quiet_NaN = __glibcpp_long_double_has_quiet_NaN;
-      static const bool has_signaling_NaN =
-                __glibcpp_long_double_has_signaling_NaN;
-      static const float_denorm_style has_denorm =
-                __glibcpp_long_double_has_denorm;
-      static const bool has_denorm_loss =
-                __glibcpp_long_double_has_denorm_loss;
-
-      static long double infinity() throw()
-      { return __glibcpp_long_double_infinity; }
-      static long double quiet_NaN() throw()
-      { return __glibcpp_long_double_quiet_NaN; }
-      static long double signaling_NaN() throw()
-      { return __glibcpp_long_double_signaling_NaN; }
-      static long double denorm_min() throw()
-      { return __glibcpp_long_double_denorm_min; }
-
-      static const bool is_iec559 = __glibcpp_long_double_is_iec559;
-      static const bool is_bounded = __glibcpp_long_double_is_bounded;
-      static const bool is_modulo = __glibcpp_long_double_is_modulo;
-
-      static const bool traps = __glibcpp_long_double_traps; 
-      static const bool tinyness_before = __glibcpp_long_double_tinyness_before;
-      static const float_round_style round_style = 
-        __glibcpp_long_double_round_style;
-    };
-
-#undef __glibcpp_long_double_min
-#undef __glibcpp_long_double_max
-#undef __glibcpp_long_double_digits
-#undef __glibcpp_long_double_digits10
-#undef __glibcpp_long_double_radix
-#undef __glibcpp_long_double_round_error
-#undef __glibcpp_long_double_min_exponent
-#undef __glibcpp_long_double_min_exponent10
-#undef __glibcpp_long_double_max_exponent
-#undef __glibcpp_long_double_max_exponent10
-#undef __glibcpp_long_double_has_infinity
-#undef __glibcpp_long_double_has_quiet_NaN
-#undef __glibcpp_long_double_has_signaling_NaN
-#undef __glibcpp_long_double_has_denorm
-#undef __glibcpp_long_double_has_denorm_loss
-#undef __glibcpp_long_double_infinity
-#undef __glibcpp_long_double_quiet_NaN
-#undef __glibcpp_long_double_signaling_NaN
-#undef __glibcpp_long_double_denorm_min
-#undef __glibcpp_long_double_is_iec559
-#undef __glibcpp_long_double_is_bounded
-#undef __glibcpp_long_double_is_modulo
-#undef __glibcpp_long_double_traps
-#undef __glibcpp_long_double_tinyness_before
-#undef __glibcpp_long_double_round_style  
-  
-} // namespace std
-
-#endif // _CPP_NUMERIC_LIMITS
diff --git a/libstdc++-v3/include/std/list b/libstdc++-v3/include/std/list
deleted file mode 100644 (file)
index 683e0a7..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-// <list> -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-/** @file std_list.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_LIST
-#define _CPP_LIST 1
-
-#pragma GCC system_header
-
-#include <bits/functexcept.h>
-#include <bits/stl_algobase.h>
-#include <bits/stl_alloc.h>
-#include <bits/stl_construct.h>
-#include <bits/stl_uninitialized.h>
-#include <bits/stl_list.h>
-
-#endif /* _CPP_LIST */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/libstdc++-v3/include/std/locale b/libstdc++-v3/include/std/locale
deleted file mode 100644 (file)
index 82089d0..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-// Locale support -*- C++ -*-
-
-// Copyright (C) 1997-1999 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-//
-// ISO C++ 14882: 22.1  Locales
-//
-
-/** @file std_locale.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_LOCALE
-#define _CPP_LOCALE    1
-
-#pragma GCC system_header
-
-#include <bits/localefwd.h>
-#include <bits/locale_facets.h>
-#include <bits/locale_facets.tcc>
-
-#endif
-
-// Local Variables:
-// mode:c++
-// End:
diff --git a/libstdc++-v3/include/std/map b/libstdc++-v3/include/std/map
deleted file mode 100644 (file)
index 0dd38bf..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-// <map> -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-/** @file std_map.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_MAP
-#define _CPP_MAP 1
-
-#pragma GCC system_header
-
-#include <bits/stl_tree.h>
-#include <bits/stl_map.h>
-#include <bits/stl_multimap.h>
-
-#endif /* _CPP_MAP */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/libstdc++-v3/include/std/memory b/libstdc++-v3/include/std/memory
deleted file mode 100644 (file)
index c9a2e59..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-// <memory> -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- * Copyright (c) 1997-1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
-
-/** @file std_memory.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_MEMORY
-#define _CPP_MEMORY 1
-
-#pragma GCC system_header
-
-#include <bits/stl_algobase.h>
-#include <bits/stl_alloc.h>
-#include <bits/stl_construct.h>
-#include <bits/stl_iterator_base_types.h> //for iterator_traits
-#include <bits/stl_tempbuf.h>
-#include <bits/stl_uninitialized.h>
-#include <bits/stl_raw_storage_iter.h>
-
-namespace std
-{
-
- template<class _Tp1> struct auto_ptr_ref {
-   _Tp1* _M_ptr;
-   auto_ptr_ref(_Tp1* __p) : _M_ptr(__p) {}
-};
-
-/**
- *  A simple smart pointer providing strict ownership semantics.  (More later.)
-*/
-template <class _Tp> class auto_ptr {
-private:
-  _Tp* _M_ptr;
-
-public:
-  typedef _Tp element_type;
-
-  explicit auto_ptr(_Tp* __p = 0) throw() : _M_ptr(__p) {}
-  auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) {}
-
-  template <class _Tp1> auto_ptr(auto_ptr<_Tp1>& __a) throw()
-    : _M_ptr(__a.release()) {}
-
-  auto_ptr& operator=(auto_ptr& __a) throw() {
-    reset(__a.release());
-    return *this;
-  }
-
-  template <class _Tp1>
-  auto_ptr& operator=(auto_ptr<_Tp1>& __a) throw() {
-    reset(__a.release());
-    return *this;
-  }
-  
-  // Note: The C++ standard says there is supposed to be an empty throw
-  // specification here, but omitting it is standard conforming.  Its 
-  // presence can be detected only if _Tp::~_Tp() throws, but (17.4.3.6/2)
-  // this is prohibited.
-  ~auto_ptr() { delete _M_ptr; }
-  _Tp& operator*() const throw() {
-    return *_M_ptr;
-  }
-  _Tp* operator->() const throw() {
-    return _M_ptr;
-  }
-  _Tp* get() const throw() {
-    return _M_ptr;
-  }
-  _Tp* release() throw() {
-    _Tp* __tmp = _M_ptr;
-    _M_ptr = 0;
-    return __tmp;
-  }
-  void reset(_Tp* __p = 0) throw() {
-    if (__p != _M_ptr) {
-      delete _M_ptr;
-      _M_ptr = __p;
-    }    
-  }
-
-public:
-  auto_ptr(auto_ptr_ref<_Tp> __ref) throw()
-    : _M_ptr(__ref._M_ptr) {}
-
-  auto_ptr& operator=(auto_ptr_ref<_Tp> __ref) throw() {
-    if (__ref._M_ptr != this->get()) {
-      delete _M_ptr;
-      _M_ptr = __ref._M_ptr;
-    }
-    return *this;
-  }
-
-  template <class _Tp1> operator auto_ptr_ref<_Tp1>() throw() 
-    { return auto_ptr_ref<_Tp>(this->release()); }
-  template <class _Tp1> operator auto_ptr<_Tp1>() throw()
-    { return auto_ptr<_Tp1>(this->release()); }
-};
-
-} // namespace std
-
-#endif /* _CPP_MEMORY */
-
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/libstdc++-v3/include/std/numeric b/libstdc++-v3/include/std/numeric
deleted file mode 100644 (file)
index e7a6adc..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-// <numeric> -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-/** @file std_numeric.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_NUMERIC
-#define _CPP_NUMERIC 1
-
-#pragma GCC system_header
-#include <bits/c++config.h>
-#include <cstddef>
-#include <iterator>
-#include <bits/stl_function.h>
-#include <bits/stl_numeric.h>
-
-#endif /* _CPP_NUMERIC */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/libstdc++-v3/include/std/ostream b/libstdc++-v3/include/std/ostream
deleted file mode 100644 (file)
index e3ec326..0000000
+++ /dev/null
@@ -1,288 +0,0 @@
-// Output streams -*- C++ -*-
-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-//
-// ISO C++ 14882: 27.6.2  Output streams
-//
-
-/** @file std_ostream.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_OSTREAM
-#define _CPP_OSTREAM   1
-
-#pragma GCC system_header
-
-#include <ios>
-
-namespace std
-{
-  // 27.6.2.1 Template class basic_ostream
-  template<typename _CharT, typename _Traits>
-    class basic_ostream : virtual public basic_ios<_CharT, _Traits>
-    {
-    public:
-
-      // Types (inherited from basic_ios (27.4.4)):
-      typedef _CharT                                   char_type;
-      typedef typename _Traits::int_type               int_type;
-      typedef typename _Traits::pos_type               pos_type;
-      typedef typename _Traits::off_type               off_type;
-      typedef _Traits                                  traits_type;
-      
-      // Non-standard Types:
-      typedef basic_streambuf<_CharT, _Traits>                 __streambuf_type;
-      typedef basic_ios<_CharT, _Traits>               __ios_type;
-      typedef basic_ostream<_CharT, _Traits>           __ostream_type;
-      typedef ostreambuf_iterator<_CharT, _Traits>     __ostreambuf_iter;
-      typedef num_put<_CharT, __ostreambuf_iter>        __numput_type;
-      typedef ctype<_CharT>                            __ctype_type;
-
-      // 27.6.2.2 Constructor/destructor:
-      explicit 
-      basic_ostream(__streambuf_type* __sb)
-      { this->init(__sb); }
-
-      virtual 
-      ~basic_ostream() { }
-
-      // 27.6.2.3 Prefix/suffix:
-      class sentry;
-      friend class sentry;
-      
-      // 27.6.2.5 Formatted output:
-      // 27.6.2.5.3  basic_ostream::operator<<
-      __ostream_type&
-      operator<<(__ostream_type& (*__pf)(__ostream_type&));
-      
-      __ostream_type&
-      operator<<(__ios_type& (*__pf)(__ios_type&));
-      
-      __ostream_type&
-      operator<<(ios_base& (*__pf) (ios_base&));
-
-      // 27.6.2.5.2 Arithmetic Inserters
-      __ostream_type& 
-      operator<<(long __n);
-      
-      __ostream_type& 
-      operator<<(unsigned long __n);
-
-      __ostream_type& 
-      operator<<(bool __n);
-
-      __ostream_type& 
-      operator<<(short __n)
-      { 
-       ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
-       if (__fmt & ios_base::oct || __fmt & ios_base::hex)
-         return this->operator<<(static_cast<unsigned long>
-                                 (static_cast<unsigned short>(__n)));
-       else
-         return this->operator<<(static_cast<long>(__n));
-      }
-
-      __ostream_type& 
-      operator<<(unsigned short __n)
-      { return this->operator<<(static_cast<unsigned long>(__n)); }
-
-      __ostream_type& 
-      operator<<(int __n)
-      { 
-       ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
-       if (__fmt & ios_base::oct || __fmt & ios_base::hex)
-         return this->operator<<(static_cast<unsigned long>
-                                 (static_cast<unsigned int>(__n)));
-       else
-         return this->operator<<(static_cast<long>(__n));
-      }
-
-      __ostream_type& 
-      operator<<(unsigned int __n)
-      { return this->operator<<(static_cast<unsigned long>(__n)); }
-
-#ifdef _GLIBCPP_USE_LONG_LONG
-      __ostream_type& 
-      operator<<(long long __n);
-
-      __ostream_type& 
-      operator<<(unsigned long long __n);
-#endif
-
-      __ostream_type& 
-      operator<<(double __f);
-
-      __ostream_type& 
-      operator<<(float __f)
-      { return this->operator<<(static_cast<double>(__f)); }
-
-      __ostream_type& 
-      operator<<(long double __f);
-
-      __ostream_type& 
-      operator<<(const void* __p);
-
-      __ostream_type& 
-      operator<<(__streambuf_type* __sb);
-
-      // Unformatted output:
-      __ostream_type& 
-      put(char_type __c);
-
-      __ostream_type& 
-      write(const char_type* __s, streamsize __n);
-
-      __ostream_type& 
-      flush();
-
-      // Seeks:
-      pos_type 
-      tellp();
-
-      __ostream_type& 
-      seekp(pos_type);
-
-      __ostream_type& 
-      seekp(off_type, ios_base::seekdir);
-
-    private:
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-      // Not defined.  (Side effect of DR 50.)
-      __ostream_type& 
-      operator=(const __ostream_type&);
-
-      basic_ostream(const __ostream_type&);
-#endif
-    };
-
-  // 27.6.2.3  Class basic_ostream::sentry
-  template <typename _CharT, typename _Traits>
-    class basic_ostream<_CharT, _Traits>::sentry
-    {
-      // Data Members:
-      bool                             _M_ok;
-      basic_ostream<_CharT,_Traits>&   _M_os;
-      
-    public:
-      explicit
-      sentry(basic_ostream<_CharT,_Traits>& __os);
-
-      ~sentry()
-      {
-       // XXX MT
-       if (_M_os.flags() & ios_base::unitbuf && !uncaught_exception())
-         {
-           // Can't call flush directly or else will get into recursive lock.
-           if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1)
-             _M_os.setstate(ios_base::badbit);
-         }
-      }
-
-      operator bool() 
-      { return _M_ok; }
-    };
-
-  template<typename _CharT, typename _Traits>
-    basic_ostream<_CharT, _Traits>&
-    operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c);
-
-  template<typename _CharT, typename _Traits>
-    basic_ostream<_CharT, _Traits>&
-    operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
-    { return (__out << __out.widen(__c)); }
-
-  // Specialization
-  template <class _Traits> 
-    basic_ostream<char, _Traits>&
-    operator<<(basic_ostream<char, _Traits>& __out, char __c);
-
-  // Signed and unsigned
-  template<class _Traits>
-    basic_ostream<char, _Traits>&
-    operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
-    { return (__out << static_cast<char>(__c)); }
-  
-  template<class _Traits>
-    basic_ostream<char, _Traits>&
-    operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
-    { return (__out << static_cast<char>(__c)); }
-  
-  template<typename _CharT, typename _Traits>
-    basic_ostream<_CharT, _Traits>&
-    operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s);
-
-  template<typename _CharT, typename _Traits>
-    basic_ostream<_CharT, _Traits> &
-    operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s);
-
-  // Partial specializationss
-  template<class _Traits>
-    basic_ostream<char, _Traits>&
-    operator<<(basic_ostream<char, _Traits>& __out, const char* __s);
-  // Signed and unsigned
-  template<class _Traits>
-    basic_ostream<char, _Traits>&
-    operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
-    { return (__out << reinterpret_cast<const char*>(__s)); }
-
-  template<class _Traits>
-    basic_ostream<char, _Traits> &
-    operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
-    { return (__out << reinterpret_cast<const char*>(__s)); }
-
-  // 27.6.2.7 Standard basic_ostream manipulators
-  template<typename _CharT, typename _Traits>
-    basic_ostream<_CharT, _Traits>& 
-    endl(basic_ostream<_CharT, _Traits>& __os)
-    { return flush(__os.put(__os.widen('\n'))); }
-
-  template<typename _CharT, typename _Traits>
-    basic_ostream<_CharT, _Traits>& 
-    ends(basic_ostream<_CharT, _Traits>& __os)
-    { return __os.put(_CharT()); }
-  
-  template<typename _CharT, typename _Traits>
-    basic_ostream<_CharT, _Traits>& 
-    flush(basic_ostream<_CharT, _Traits>& __os)
-    { return __os.flush(); }
-
-} // namespace std
-
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# define export
-#ifdef  _GLIBCPP_FULLY_COMPLIANT_HEADERS
-# include <bits/ostream.tcc>
-#endif
-#endif
-
-#endif /* _CPP_OSTREAM */
-
diff --git a/libstdc++-v3/include/std/queue b/libstdc++-v3/include/std/queue
deleted file mode 100644 (file)
index ecf7f4c..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-// <queue> -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-/** @file std_queue.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_QUEUE
-#define _CPP_QUEUE 1
-
-#pragma GCC system_header
-#include <bits/c++config.h>
-#include <bits/functexcept.h>
-#include <bits/stl_algobase.h>
-#include <bits/stl_alloc.h>
-#include <bits/stl_construct.h>
-#include <bits/stl_uninitialized.h>
-#include <bits/stl_vector.h>
-#include <bits/stl_heap.h>
-#include <bits/stl_deque.h>
-#include <bits/stl_function.h>
-#include <bits/stl_queue.h>
-
-#endif /* _CPP_QUEUE */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/libstdc++-v3/include/std/set b/libstdc++-v3/include/std/set
deleted file mode 100644 (file)
index dab8e71..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-// <set> -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-/** @file std_set.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_SET
-#define _CPP_SET 1
-
-#pragma GCC system_header
-
-#include <bits/stl_tree.h>
-#include <bits/stl_set.h>
-#include <bits/stl_multiset.h>
-
-#endif /* _CPP_SET */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/libstdc++-v3/include/std/sstream b/libstdc++-v3/include/std/sstream
deleted file mode 100644 (file)
index fb90986..0000000
+++ /dev/null
@@ -1,372 +0,0 @@
-// String based streams -*- C++ -*-
-
-// Copyright (C) 1997-1999 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-//
-// ISO C++ 14882: 27.7  String-based streams
-//
-
-/** @file std_sstream.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_SSTREAM
-#define _CPP_SSTREAM   1
-
-#pragma GCC system_header
-
-#include <istream>
-#include <ostream>
-
-namespace std
-{
-  template<typename _CharT, typename _Traits, typename _Alloc>
-    class basic_stringbuf : public basic_streambuf<_CharT, _Traits>
-    {
-    public:
-      // Types:
-      typedef _CharT                                   char_type;
-      typedef _Traits                                  traits_type;
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 251. basic_stringbuf missing allocator_type
-      typedef _Alloc                                   allocator_type;
-#endif
-      typedef typename traits_type::int_type           int_type;
-      typedef typename traits_type::pos_type           pos_type;
-      typedef typename traits_type::off_type           off_type;
-
-      // Non-standard Types:
-      typedef basic_streambuf<char_type, traits_type>          __streambuf_type;
-      typedef basic_string<char_type, _Traits, _Alloc>         __string_type;
-      typedef typename __string_type::size_type                __size_type;
-
-    private:
-      // Data Members:
-      __string_type            _M_string;
-      
-    public:
-      // Constructors:
-      explicit 
-      basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out)
-      : __streambuf_type(), _M_string()
-      { _M_stringbuf_init(__mode); }
-
-      explicit 
-      basic_stringbuf(const __string_type& __str,
-                     ios_base::openmode __mode = ios_base::in | ios_base::out)
-      : __streambuf_type(), _M_string(__str.data(), __str.size())
-      { _M_stringbuf_init(__mode); }
-
-      // Get and set:
-      __string_type 
-      str() const 
-      {
-       if (_M_mode & ios_base::out)
-         {
-           // This is the deal: _M_string.size() is a value that
-           // represents the size of the initial string that makes
-           // _M_string, and may not be the correct size of the
-           // current stringbuf internal buffer.
-           __size_type __len = _M_string.size();
-           if (_M_out_cur > _M_out_beg)
-             __len = max(__size_type(_M_out_end - _M_out_beg), __len);
-           return __string_type(_M_out_beg, _M_out_beg + __len);
-         }
-       else
-         return _M_string;
-      }
-
-      void 
-      str(const __string_type& __s)
-      {
-       _M_string = __s;
-       _M_stringbuf_init(_M_mode);
-      }
-
-    protected:
-      // Common initialization code for both ctors goes here.
-      void
-      _M_stringbuf_init(ios_base::openmode __mode)
-      {
-       // _M_buf_size is a convenient alias for "what the streambuf
-       // thinks the allocated size of the string really is." This is
-       // necessary as ostringstreams are implemented with the
-       // streambufs having control of the allocation and
-       // re-allocation of the internal string object, _M_string.
-       _M_buf_size = _M_string.size();
-
-       // NB: Start ostringstream buffers at 512 bytes. This is an
-       // experimental value (pronounced "arbitrary" in some of the
-       // hipper english-speaking countries), and can be changed to
-       // suite particular needs.
-       _M_buf_size_opt = 512;
-       _M_mode = __mode;
-       if (_M_mode & ios_base::ate)
-         _M_really_sync(0, _M_buf_size); 
-       else  
-         _M_really_sync(0, 0);
-      }
-
-      // Overridden virtual functions:
-      virtual int_type 
-      underflow()
-      {
-       if (_M_in_cur && _M_in_cur < _M_in_end)
-         return traits_type::to_int_type(*gptr());
-       else
-         return traits_type::eof();
-      }
-
-      virtual int_type 
-      pbackfail(int_type __c = traits_type::eof());
-
-      virtual int_type 
-      overflow(int_type __c = traits_type::eof());
-
-      virtual __streambuf_type* 
-      setbuf(char_type* __s, streamsize __n)
-      { 
-       if (__s && __n) 
-         {
-           _M_string = __string_type(__s, __n);
-           _M_really_sync(0, 0);
-         }
-       return this; 
-      } 
-
-      virtual pos_type 
-      seekoff(off_type __off, ios_base::seekdir __way,
-             ios_base::openmode __mode = ios_base::in | ios_base::out);
-
-      virtual pos_type 
-      seekpos(pos_type __sp, 
-             ios_base::openmode __mode = ios_base::in | ios_base::out);
-
-      // Internal function for correctly updating the internal buffer
-      // for a particular _M_string, due to initialization or
-      // re-sizing of an existing _M_string.
-      // Assumes: contents of _M_string and internal buffer match exactly.
-      // __i == _M_in_cur - _M_in_beg      
-      // __o == _M_out_cur - _M_out_beg
-      virtual int 
-      _M_really_sync(__size_type __i, __size_type __o)
-      {
-       char_type* __base = const_cast<char_type*>(_M_string.data());
-       bool __testin = _M_mode & ios_base::in;
-       bool __testout = _M_mode & ios_base::out;
-       __size_type __len = _M_string.size();
-
-       _M_buf = __base;
-       if (__testin)
-           this->setg(__base, __base + __i, __base + __len);
-       if (__testout)
-         {
-           this->setp(__base, __base + __len);
-           _M_out_cur += __o;
-         }
-       return 0;
-      }
-    };
-
-
-  // 27.7.2  Template class basic_istringstream
-  template<typename _CharT, typename _Traits, typename _Alloc>
-    class basic_istringstream : public basic_istream<_CharT, _Traits>
-    {
-    public:
-      // Types:
-      typedef _CharT                                   char_type;
-      typedef _Traits                                  traits_type;
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 251. basic_stringbuf missing allocator_type
-      typedef _Alloc                                   allocator_type;
-#endif
-      typedef typename traits_type::int_type           int_type;
-      typedef typename traits_type::pos_type           pos_type;
-      typedef typename traits_type::off_type           off_type;
-
-      // Non-standard types:
-      typedef basic_string<_CharT, _Traits, _Alloc>    __string_type;
-      typedef basic_stringbuf<_CharT, _Traits, _Alloc>         __stringbuf_type;
-      typedef basic_istream<char_type, traits_type>    __istream_type;
-
-    private:
-      __stringbuf_type _M_stringbuf;
-
-    public:
-      // Constructors:
-      explicit 
-      basic_istringstream(ios_base::openmode __mode = ios_base::in)
-      : __istream_type(NULL), _M_stringbuf(__mode | ios_base::in)
-      { this->init(&_M_stringbuf); }
-
-      explicit 
-      basic_istringstream(const __string_type& __str,
-                         ios_base::openmode __mode = ios_base::in)
-      : __istream_type(NULL), _M_stringbuf(__str, __mode | ios_base::in)
-      { this->init(&_M_stringbuf); }
-
-      ~basic_istringstream()
-      { }
-
-      // Members:
-      __stringbuf_type* 
-      rdbuf() const
-      { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
-
-      __string_type
-      str() const
-      { return _M_stringbuf.str(); }
-  
-      void 
-      str(const __string_type& __s)
-      { _M_stringbuf.str(__s); }
-    };
-
-
-  // 27.7.3  Template class basic_ostringstream
-  template <typename _CharT, typename _Traits, typename _Alloc>
-    class basic_ostringstream : public basic_ostream<_CharT, _Traits>
-    {
-    public:
-      // Types:
-      typedef _CharT                                   char_type;
-      typedef _Traits                                  traits_type;
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 251. basic_stringbuf missing allocator_type
-      typedef _Alloc                                   allocator_type;
-#endif
-      typedef typename traits_type::int_type           int_type;
-      typedef typename traits_type::pos_type           pos_type;
-      typedef typename traits_type::off_type           off_type;
-
-      // Non-standard types:
-      typedef basic_string<_CharT, _Traits, _Alloc>    __string_type;
-      typedef basic_stringbuf<_CharT, _Traits, _Alloc>         __stringbuf_type;
-      typedef basic_ostream<char_type, traits_type>    __ostream_type;
-
-    private:
-      __stringbuf_type _M_stringbuf;
-
-    public:
-     // Constructors/destructor:
-      explicit 
-      basic_ostringstream(ios_base::openmode __mode = ios_base::out)
-      : __ostream_type(NULL), _M_stringbuf(__mode | ios_base::out)
-      { this->init(&_M_stringbuf); }
-
-      explicit 
-      basic_ostringstream(const __string_type& __str,
-                         ios_base::openmode __mode = ios_base::out)
-      : __ostream_type(NULL), _M_stringbuf(__str, __mode | ios_base::out)
-      { this->init(&_M_stringbuf); }
-
-      ~basic_ostringstream()
-      { }
-
-      // Members:
-      __stringbuf_type* 
-      rdbuf() const
-      { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
-
-      __string_type
-      str() const
-      { return _M_stringbuf.str(); }
-      void 
-      str(const __string_type& __s)
-      { _M_stringbuf.str(__s); }
-    };
-  
-  
-  // 27.7.4  Template class basic_stringstream
-  template <typename _CharT, typename _Traits, typename _Alloc>
-    class basic_stringstream : public basic_iostream<_CharT, _Traits>
-    {
-    public:
-      // Types:
-      typedef _CharT                                   char_type;
-      typedef _Traits                                  traits_type;
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-// 251. basic_stringbuf missing allocator_type
-      typedef _Alloc                                   allocator_type;
-#endif
-      typedef typename traits_type::int_type           int_type;
-      typedef typename traits_type::pos_type           pos_type;
-      typedef typename traits_type::off_type           off_type;
-
-      // Non-standard Types:
-      typedef basic_string<_CharT, _Traits, _Alloc>    __string_type;
-      typedef basic_stringbuf<_CharT, _Traits, _Alloc>         __stringbuf_type;
-      typedef basic_iostream<char_type, traits_type>   __iostream_type;
-
-    private:
-      __stringbuf_type _M_stringbuf;
-
-    public:
-      // Constructors/destructors
-      explicit 
-      basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in)
-      : __iostream_type(NULL), _M_stringbuf(__m)
-      { this->init(&_M_stringbuf); }
-
-      explicit 
-      basic_stringstream(const __string_type& __str,
-                        ios_base::openmode __m = ios_base::out | ios_base::in)
-      : __iostream_type(NULL), _M_stringbuf(__str, __m)
-      { this->init(&_M_stringbuf); }
-
-      ~basic_stringstream()
-      { }
-
-      // Members:
-      __stringbuf_type* 
-      rdbuf() const
-      { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
-
-      __string_type
-      str() const
-      { return _M_stringbuf.str(); }
-
-      void 
-      str(const __string_type& __s)
-      { _M_stringbuf.str(__s); }
-    };
-} // namespace std
-
-
-
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# define export
-#ifdef  _GLIBCPP_FULLY_COMPLIANT_HEADERS
-# include <bits/sstream.tcc>
-#endif
-#endif
-
-#endif // _CPP_SSTREAM
diff --git a/libstdc++-v3/include/std/stack b/libstdc++-v3/include/std/stack
deleted file mode 100644 (file)
index 166f428..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-// <stack> -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-/** @file std_stack.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_STACK
-#define _CPP_STACK 1
-
-#pragma GCC system_header
-
-#include <bits/stl_algobase.h>
-#include <bits/stl_alloc.h>
-#include <bits/stl_construct.h>
-#include <bits/stl_uninitialized.h>
-#include <bits/stl_deque.h>
-#include <bits/stl_stack.h>
-
-#endif /* _CPP_STACK */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/libstdc++-v3/include/std/std_algorithm.h b/libstdc++-v3/include/std/std_algorithm.h
new file mode 100644 (file)
index 0000000..746eb47
--- /dev/null
@@ -0,0 +1,76 @@
+// <algorithm> -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file std_algorithm.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_ALGORITHM
+#define _CPP_ALGORITHM 1
+
+#pragma GCC system_header
+
+#include <bits/stl_algobase.h>
+#include <bits/stl_construct.h>
+#include <bits/stl_uninitialized.h>
+#include <bits/stl_tempbuf.h>
+#include <bits/stl_algo.h>
+
+#endif /* _CPP_ALGORITHM */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/libstdc++-v3/include/std/std_bitset.h b/libstdc++-v3/include/std/std_bitset.h
new file mode 100644 (file)
index 0000000..d9119e1
--- /dev/null
@@ -0,0 +1,814 @@
+// <bitset> -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/*
+ * Copyright (c) 1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */ 
+
+/** @file std_bitset.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef __GLIBCPP_BITSET
+#define __GLIBCPP_BITSET
+
+#pragma GCC system_header
+
+// A bitset of size N has N % (sizeof(unsigned long) * CHAR_BIT) unused 
+// bits.  (They are the high- order bits in the highest word.)  It is
+// a class invariant of class bitset<> that those unused bits are
+// always zero.
+
+// Most of the actual code isn't contained in bitset<> itself, but in the 
+// base class _Base_bitset.  The base class works with whole words, not with
+// individual bits.  This allows us to specialize _Base_bitset for the
+// important special case where the bitset is only a single word.
+
+
+#include <cstddef>     // for size_t
+#include <cstring>     // for memset
+#include <string>
+#include <stdexcept>
+#include <bits/functexcept.h>   // for invalid_argument, out_of_range, 
+                                // overflow_error
+#include <ostream>     // for ostream (operator<<)
+#include <istream>     // for istream (operator>>)
+
+#define _GLIBCPP_BITSET_BITS_PER_WORD (CHAR_BIT*sizeof(unsigned long))
+#define __BITSET_WORDS(__n) \
+ ((__n) < 1 ? 1 : ((__n) + _GLIBCPP_BITSET_BITS_PER_WORD - 1)/_GLIBCPP_BITSET_BITS_PER_WORD)
+
+namespace std
+{
+
+// structure to aid in counting bits
+template<bool __dummy> 
+struct _Bit_count {
+  static unsigned char _S_bit_count[256];
+};
+
+// Mapping from 8 bit unsigned integers to the index of the first one
+// bit:
+template<bool __dummy> 
+struct _First_one {
+  static unsigned char _S_first_one[256];
+};
+
+//
+// Base class: general case.
+//
+
+template<size_t _Nw>
+struct _Base_bitset {
+  typedef unsigned long _WordT;
+
+  _WordT _M_w[_Nw];                // 0 is the least significant word.
+
+  _Base_bitset( void ) { _M_do_reset(); }
+  _Base_bitset(unsigned long __val) {
+    _M_do_reset();
+    _M_w[0] = __val;
+  }
+
+  static size_t _S_whichword( size_t __pos )
+    { return __pos / _GLIBCPP_BITSET_BITS_PER_WORD; }
+  static size_t _S_whichbyte( size_t __pos )
+    { return (__pos % _GLIBCPP_BITSET_BITS_PER_WORD) / CHAR_BIT; }
+  static size_t _S_whichbit( size_t __pos )
+    { return __pos % _GLIBCPP_BITSET_BITS_PER_WORD; }
+  static _WordT _S_maskbit( size_t __pos )
+    { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
+
+  _WordT& _M_getword(size_t __pos)       { return _M_w[_S_whichword(__pos)]; }
+  _WordT  _M_getword(size_t __pos) const { return _M_w[_S_whichword(__pos)]; }
+
+  _WordT& _M_hiword()       { return _M_w[_Nw - 1]; }
+  _WordT  _M_hiword() const { return _M_w[_Nw - 1]; }
+
+  void _M_do_and(const _Base_bitset<_Nw>& __x) {
+    for ( size_t __i = 0; __i < _Nw; __i++ ) {
+      _M_w[__i] &= __x._M_w[__i];
+    }
+  }
+
+  void _M_do_or(const _Base_bitset<_Nw>& __x) {
+    for ( size_t __i = 0; __i < _Nw; __i++ ) {
+      _M_w[__i] |= __x._M_w[__i];
+    }
+  }
+
+  void _M_do_xor(const _Base_bitset<_Nw>& __x) {
+    for ( size_t __i = 0; __i < _Nw; __i++ ) {
+      _M_w[__i] ^= __x._M_w[__i];
+    }
+  }
+
+  void _M_do_left_shift(size_t __shift);
+  void _M_do_right_shift(size_t __shift);
+
+  void _M_do_flip() {
+    for ( size_t __i = 0; __i < _Nw; __i++ ) {
+      _M_w[__i] = ~_M_w[__i];
+    }
+  }
+
+  void _M_do_set() {
+    for ( size_t __i = 0; __i < _Nw; __i++ ) {
+      _M_w[__i] = ~static_cast<_WordT>(0);
+    }
+  }
+
+  void _M_do_reset() { memset(_M_w, 0, _Nw * sizeof(_WordT)); }
+
+  bool _M_is_equal(const _Base_bitset<_Nw>& __x) const {
+    for (size_t __i = 0; __i < _Nw; ++__i) {
+      if (_M_w[__i] != __x._M_w[__i])
+        return false;
+    }
+    return true;
+  }
+
+  bool _M_is_any() const {
+    for ( size_t __i = 0; __i < _Nw; __i++ ) {
+      if ( _M_w[__i] != static_cast<_WordT>(0) )
+        return true;
+    }
+    return false;
+  }
+
+  size_t _M_do_count() const {
+    size_t __result = 0;
+    const unsigned char* __byte_ptr = (const unsigned char*)_M_w;
+    const unsigned char* __end_ptr = (const unsigned char*)(_M_w+_Nw);
+
+    while ( __byte_ptr < __end_ptr ) {
+      __result += _Bit_count<true>::_S_bit_count[*__byte_ptr];
+      __byte_ptr++;
+    }
+    return __result;
+  }
+
+  unsigned long _M_do_to_ulong() const; 
+
+  // find first "on" bit
+  size_t _M_do_find_first(size_t __not_found) const;
+
+  // find the next "on" bit that follows "prev"
+  size_t _M_do_find_next(size_t __prev, size_t __not_found) const;
+};
+
+//
+// Definitions of non-inline functions from _Base_bitset.
+// 
+
+template<size_t _Nw>
+void _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift) 
+{
+  if (__shift != 0) {
+    const size_t __wshift = __shift / _GLIBCPP_BITSET_BITS_PER_WORD;
+    const size_t __offset = __shift % _GLIBCPP_BITSET_BITS_PER_WORD;
+
+    if (__offset == 0)
+      for (size_t __n = _Nw - 1; __n >= __wshift; --__n)
+        _M_w[__n] = _M_w[__n - __wshift];
+
+    else {
+      const size_t __sub_offset = _GLIBCPP_BITSET_BITS_PER_WORD - __offset;
+      for (size_t __n = _Nw - 1; __n > __wshift; --__n)
+        _M_w[__n] = (_M_w[__n - __wshift] << __offset) | 
+                    (_M_w[__n - __wshift - 1] >> __sub_offset);
+      _M_w[__wshift] = _M_w[0] << __offset;
+    }
+
+    fill(_M_w + 0, _M_w + __wshift, static_cast<_WordT>(0));
+  }
+}
+
+template<size_t _Nw>
+void _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift) 
+{
+  if (__shift != 0) {
+    const size_t __wshift = __shift / _GLIBCPP_BITSET_BITS_PER_WORD;
+    const size_t __offset = __shift % _GLIBCPP_BITSET_BITS_PER_WORD;
+    const size_t __limit = _Nw - __wshift - 1;
+
+    if (__offset == 0)
+      for (size_t __n = 0; __n <= __limit; ++__n)
+        _M_w[__n] = _M_w[__n + __wshift];
+
+    else {
+      const size_t __sub_offset = _GLIBCPP_BITSET_BITS_PER_WORD - __offset;
+      for (size_t __n = 0; __n < __limit; ++__n)
+        _M_w[__n] = (_M_w[__n + __wshift] >> __offset) |
+                    (_M_w[__n + __wshift + 1] << __sub_offset);
+      _M_w[__limit] = _M_w[_Nw-1] >> __offset;
+    }
+
+    fill(_M_w + __limit + 1, _M_w + _Nw, static_cast<_WordT>(0));
+  }
+}
+
+template<size_t _Nw>
+unsigned long _Base_bitset<_Nw>::_M_do_to_ulong() const
+{
+  for (size_t __i = 1; __i < _Nw; ++__i) 
+    if (_M_w[__i]) 
+      __throw_overflow_error("bitset");
+  
+  return _M_w[0];
+}
+
+template<size_t _Nw>
+size_t _Base_bitset<_Nw>::_M_do_find_first(size_t __not_found) const 
+{
+  for ( size_t __i = 0; __i < _Nw; __i++ ) {
+    _WordT __thisword = _M_w[__i];
+    if ( __thisword != static_cast<_WordT>(0) ) {
+      // find byte within word
+      for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) {
+        unsigned char __this_byte
+          = static_cast<unsigned char>(__thisword & (~(unsigned char)0));
+        if ( __this_byte )
+          return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT +
+            _First_one<true>::_S_first_one[__this_byte];
+
+        __thisword >>= CHAR_BIT;
+      }
+    }
+  }
+  // not found, so return an indication of failure.
+  return __not_found;
+}
+
+template<size_t _Nw>
+size_t
+_Base_bitset<_Nw>::_M_do_find_next(size_t __prev, size_t __not_found) const
+{
+  // make bound inclusive
+  ++__prev;
+
+  // check out of bounds
+  if ( __prev >= _Nw * _GLIBCPP_BITSET_BITS_PER_WORD )
+    return __not_found;
+
+    // search first word
+  size_t __i = _S_whichword(__prev);
+  _WordT __thisword = _M_w[__i];
+
+    // mask off bits below bound
+  __thisword &= (~static_cast<_WordT>(0)) << _S_whichbit(__prev);
+
+  if ( __thisword != static_cast<_WordT>(0) ) {
+    // find byte within word
+    // get first byte into place
+    __thisword >>= _S_whichbyte(__prev) * CHAR_BIT;
+    for ( size_t __j = _S_whichbyte(__prev); __j < sizeof(_WordT); __j++ ) {
+      unsigned char __this_byte
+        = static_cast<unsigned char>(__thisword & (~(unsigned char)0));
+      if ( __this_byte )
+        return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT +
+          _First_one<true>::_S_first_one[__this_byte];
+
+      __thisword >>= CHAR_BIT;
+    }
+  }
+
+  // check subsequent words
+  __i++;
+  for ( ; __i < _Nw; __i++ ) {
+    __thisword = _M_w[__i];
+    if ( __thisword != static_cast<_WordT>(0) ) {
+      // find byte within word
+      for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) {
+        unsigned char __this_byte
+          = static_cast<unsigned char>(__thisword & (~(unsigned char)0));
+        if ( __this_byte )
+          return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT +
+            _First_one<true>::_S_first_one[__this_byte];
+
+        __thisword >>= CHAR_BIT;
+      }
+    }
+  }
+
+  // not found, so return an indication of failure.
+  return __not_found;
+} // end _M_do_find_next
+
+
+// ------------------------------------------------------------
+
+//
+// Base class: specialization for a single word.
+//
+
+template<> struct _Base_bitset<1> {
+  typedef unsigned long _WordT;
+  _WordT _M_w;
+
+  _Base_bitset( void ) : _M_w(0) {}
+  _Base_bitset(unsigned long __val) : _M_w(__val) {}
+
+  static size_t _S_whichword( size_t __pos )
+    { return __pos / _GLIBCPP_BITSET_BITS_PER_WORD; }
+  static size_t _S_whichbyte( size_t __pos )
+    { return (__pos % _GLIBCPP_BITSET_BITS_PER_WORD) / CHAR_BIT; }
+  static size_t _S_whichbit( size_t __pos )
+    {  return __pos % _GLIBCPP_BITSET_BITS_PER_WORD; }
+  static _WordT _S_maskbit( size_t __pos )
+    { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
+
+  _WordT& _M_getword(size_t)       { return _M_w; }
+  _WordT  _M_getword(size_t) const { return _M_w; }
+
+  _WordT& _M_hiword()       { return _M_w; }
+  _WordT  _M_hiword() const { return _M_w; }
+
+  void _M_do_and(const _Base_bitset<1>& __x) { _M_w &= __x._M_w; }
+  void _M_do_or(const _Base_bitset<1>& __x)  { _M_w |= __x._M_w; }
+  void _M_do_xor(const _Base_bitset<1>& __x) { _M_w ^= __x._M_w; }
+  void _M_do_left_shift(size_t __shift)     { _M_w <<= __shift; }
+  void _M_do_right_shift(size_t __shift)    { _M_w >>= __shift; }
+  void _M_do_flip()                       { _M_w = ~_M_w; }
+  void _M_do_set()                        { _M_w = ~static_cast<_WordT>(0); }
+  void _M_do_reset()                      { _M_w = 0; }
+
+  bool _M_is_equal(const _Base_bitset<1>& __x) const
+    { return _M_w == __x._M_w; }
+  bool _M_is_any() const
+    { return _M_w != 0; }
+
+  size_t _M_do_count() const {
+    size_t __result = 0;
+    const unsigned char* __byte_ptr = (const unsigned char*)&_M_w;
+    const unsigned char* __end_ptr
+      = ((const unsigned char*)&_M_w)+sizeof(_M_w);
+    while ( __byte_ptr < __end_ptr ) {
+      __result += _Bit_count<true>::_S_bit_count[*__byte_ptr];
+      __byte_ptr++;
+    }
+    return __result;
+  }
+
+  unsigned long _M_do_to_ulong() const { return _M_w; }
+
+  size_t _M_do_find_first(size_t __not_found) const;
+
+  // find the next "on" bit that follows "prev"
+  size_t _M_do_find_next(size_t __prev, size_t __not_found) const; 
+
+};
+
+
+// ------------------------------------------------------------
+// Helper class to zero out the unused high-order bits in the highest word.
+
+template <size_t _Extrabits> struct _Sanitize {
+  static void _M_do_sanitize(unsigned long& __val)
+    { __val &= ~((~static_cast<unsigned long>(0)) << _Extrabits); }
+};
+
+template<> struct _Sanitize<0> {
+  static void _M_do_sanitize(unsigned long) {}
+};
+
+
+
+// ------------------------------------------------------------
+// Class bitset.
+//   _Nb may be any nonzero number of type size_t.
+
+template<size_t _Nb>
+class bitset : private _Base_bitset<__BITSET_WORDS(_Nb)>
+{
+private:
+  typedef _Base_bitset<__BITSET_WORDS(_Nb)> _Base;
+  typedef unsigned long _WordT;
+
+private:
+  void _M_do_sanitize() {
+    _Sanitize<_Nb%_GLIBCPP_BITSET_BITS_PER_WORD>::_M_do_sanitize(this->_M_hiword());
+  }
+
+public:
+
+  // bit reference:
+  class reference;
+  friend class reference;
+
+  class reference {
+    friend class bitset;
+
+    _WordT *_M_wp;
+    size_t _M_bpos;
+
+    // left undefined
+    reference();
+
+  public:
+    reference( bitset& __b, size_t __pos ) {
+      _M_wp = &__b._M_getword(__pos);
+      _M_bpos = _Base::_S_whichbit(__pos);
+    }
+
+    ~reference() {}
+
+    // for b[i] = __x;
+    reference& operator=(bool __x) {
+      if ( __x )
+        *_M_wp |= _Base::_S_maskbit(_M_bpos);
+      else
+        *_M_wp &= ~_Base::_S_maskbit(_M_bpos);
+
+      return *this;
+    }
+
+    // for b[i] = b[__j];
+    reference& operator=(const reference& __j) {
+      if ( (*(__j._M_wp) & _Base::_S_maskbit(__j._M_bpos)) )
+        *_M_wp |= _Base::_S_maskbit(_M_bpos);
+      else
+        *_M_wp &= ~_Base::_S_maskbit(_M_bpos);
+
+      return *this;
+    }
+
+    // flips the bit
+    bool operator~() const
+      { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) == 0; }
+
+    // for __x = b[i];
+    operator bool() const
+      { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) != 0; }
+
+    // for b[i].flip();
+    reference& flip() {
+      *_M_wp ^= _Base::_S_maskbit(_M_bpos);
+      return *this;
+    }
+  };
+
+  // 23.3.5.1 constructors:
+  bitset() {}
+  bitset(unsigned long __val) : _Base_bitset<__BITSET_WORDS(_Nb)>(__val) 
+    { _M_do_sanitize(); }
+
+  template<class _CharT, class _Traits, class _Alloc>
+  explicit bitset(const basic_string<_CharT, _Traits, _Alloc>& __s,
+                  size_t __pos = 0)
+    : _Base() 
+  {
+    if (__pos > __s.size()) 
+      __throw_out_of_range("bitset");
+    _M_copy_from_string(__s, __pos,
+                        basic_string<_CharT, _Traits, _Alloc>::npos);
+  }
+  template<class _CharT, class _Traits, class _Alloc>
+  bitset(const basic_string<_CharT, _Traits, _Alloc>& __s,
+         size_t __pos,
+         size_t __n)
+    : _Base() 
+  {
+    if (__pos > __s.size()) 
+      __throw_out_of_range("bitset");
+    _M_copy_from_string(__s, __pos, __n);
+  }
+
+  // 23.3.5.2 bitset operations:
+  bitset<_Nb>& operator&=(const bitset<_Nb>& __rhs) {
+    this->_M_do_and(__rhs);
+    return *this;
+  }
+
+  bitset<_Nb>& operator|=(const bitset<_Nb>& __rhs) {
+    this->_M_do_or(__rhs);
+    return *this;
+  }
+
+  bitset<_Nb>& operator^=(const bitset<_Nb>& __rhs) {
+    this->_M_do_xor(__rhs);
+    return *this;
+  }
+
+  bitset<_Nb>& operator<<=(size_t __pos) {
+    this->_M_do_left_shift(__pos);
+    this->_M_do_sanitize();
+    return *this;
+  }
+
+  bitset<_Nb>& operator>>=(size_t __pos) {
+    this->_M_do_right_shift(__pos);
+    this->_M_do_sanitize();
+    return *this;
+  }
+
+  //
+  // Extension:
+  // Versions of single-bit set, reset, flip, test with no range checking.
+  //
+
+  bitset<_Nb>& _Unchecked_set(size_t __pos) {
+    this->_M_getword(__pos) |= _Base::_S_maskbit(__pos);
+    return *this;
+  }
+
+  bitset<_Nb>& _Unchecked_set(size_t __pos, int __val) {
+    if (__val)
+      this->_M_getword(__pos) |= _Base::_S_maskbit(__pos);
+    else
+      this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos);
+
+    return *this;
+  }
+
+  bitset<_Nb>& _Unchecked_reset(size_t __pos) {
+    this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos);
+    return *this;
+  }
+
+  bitset<_Nb>& _Unchecked_flip(size_t __pos) {
+    this->_M_getword(__pos) ^= _Base::_S_maskbit(__pos);
+    return *this;
+  }
+
+  bool _Unchecked_test(size_t __pos) const {
+    return (this->_M_getword(__pos) & _Base::_S_maskbit(__pos))
+      != static_cast<_WordT>(0);
+  }
+
+  // Set, reset, and flip.
+
+  bitset<_Nb>& set() {
+    this->_M_do_set();
+    this->_M_do_sanitize();
+    return *this;
+  }
+
+  bitset<_Nb>& set(size_t __pos, bool __val = true) {
+    if (__pos >= _Nb)
+      __throw_out_of_range("bitset");
+
+    return _Unchecked_set(__pos, __val);
+  }
+
+  bitset<_Nb>& reset() {
+    this->_M_do_reset();
+    return *this;
+  }
+
+  bitset<_Nb>& reset(size_t __pos) {
+    if (__pos >= _Nb)
+      __throw_out_of_range("bitset");
+
+    return _Unchecked_reset(__pos);
+  }
+
+  bitset<_Nb>& flip() {
+    this->_M_do_flip();
+    this->_M_do_sanitize();
+    return *this;
+  }
+
+  bitset<_Nb>& flip(size_t __pos) {
+    if (__pos >= _Nb)
+      __throw_out_of_range("bitset");
+
+    return _Unchecked_flip(__pos);
+  }
+
+  bitset<_Nb> operator~() const { 
+    return bitset<_Nb>(*this).flip();
+  }
+
+  // element access:
+  //for b[i];
+  // _GLIBCPP_RESOLVE_LIB_DEFECTS Note that this implementation already
+  // resolves DR 11 (items 1 and 2), but does not do the range-checking
+  // required by that DR's resolution.  -pme
+  reference operator[](size_t __pos) { return reference(*this,__pos); }
+  bool operator[](size_t __pos) const { return _Unchecked_test(__pos); }
+
+  unsigned long to_ulong() const { return this->_M_do_to_ulong(); }
+
+  template <class _CharT, class _Traits, class _Alloc>
+  basic_string<_CharT, _Traits, _Alloc> to_string() const {
+    basic_string<_CharT, _Traits, _Alloc> __result;
+    _M_copy_to_string(__result);
+    return __result;
+  }
+
+  // Helper functions for string operations.
+  template<class _CharT, class _Traits, class _Alloc>
+  void _M_copy_from_string(const basic_string<_CharT,_Traits,_Alloc>& __s,
+                          size_t,
+                          size_t);
+
+  template<class _CharT, class _Traits, class _Alloc>
+  void _M_copy_to_string(basic_string<_CharT,_Traits,_Alloc>&) const;
+
+  size_t count() const { return this->_M_do_count(); }
+
+  size_t size() const { return _Nb; }
+
+  bool operator==(const bitset<_Nb>& __rhs) const {
+    return this->_M_is_equal(__rhs);
+  }
+  bool operator!=(const bitset<_Nb>& __rhs) const {
+    return !this->_M_is_equal(__rhs);
+  }
+
+  bool test(size_t __pos) const {
+    if (__pos >= _Nb)
+      __throw_out_of_range("bitset");
+
+    return _Unchecked_test(__pos);
+  }
+
+  bool any() const { return this->_M_is_any(); }
+  bool none() const { return !this->_M_is_any(); }
+
+  bitset<_Nb> operator<<(size_t __pos) const
+    { return bitset<_Nb>(*this) <<= __pos; }
+  bitset<_Nb> operator>>(size_t __pos) const
+    { return bitset<_Nb>(*this) >>= __pos; }
+
+  //
+  // EXTENSIONS: bit-find operations.  These operations are
+  // experimental, and are subject to change or removal in future
+  // versions.
+  // 
+
+  // find the index of the first "on" bit
+  size_t _Find_first() const 
+    { return this->_M_do_find_first(_Nb); }
+
+  // find the index of the next "on" bit after prev
+  size_t _Find_next( size_t __prev ) const 
+    { return this->_M_do_find_next(__prev, _Nb); }
+
+};
+
+//
+// Definitions of non-inline member functions.
+//
+
+template <size_t _Nb>
+template<class _CharT, class _Traits, class _Alloc>
+void bitset<_Nb>
+  ::_M_copy_from_string(const basic_string<_CharT,_Traits,_Alloc>& __s,
+                        size_t __pos,
+                        size_t __n)
+{
+  reset();
+  const size_t __nbits = min(_Nb, min(__n, __s.size() - __pos));
+  for (size_t __i = 0; __i < __nbits; ++__i) {
+    switch(__s[__pos + __nbits - __i - 1]) {
+    case '0':
+      break;
+    case '1':
+      set(__i);
+      break;
+    default:
+      __throw_invalid_argument("bitset");
+    }
+  }
+}
+
+template <size_t _Nb>
+template <class _CharT, class _Traits, class _Alloc>
+void bitset<_Nb>
+  ::_M_copy_to_string(basic_string<_CharT, _Traits, _Alloc>& __s) const
+{
+  __s.assign(_Nb, '0');
+  
+  for (size_t __i = 0; __i < _Nb; ++__i) 
+    if (_Unchecked_test(__i))
+      __s[_Nb - 1 - __i] = '1';
+}
+
+// ------------------------------------------------------------
+
+//
+// 23.3.5.3 bitset operations:
+//
+
+template <size_t _Nb>
+inline bitset<_Nb> operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) {
+  bitset<_Nb> __result(__x);
+  __result &= __y;
+  return __result;
+}
+
+
+template <size_t _Nb>
+inline bitset<_Nb> operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y) {
+  bitset<_Nb> __result(__x);
+  __result |= __y;
+  return __result;
+}
+
+template <size_t _Nb>
+inline bitset<_Nb> operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) {
+  bitset<_Nb> __result(__x);
+  __result ^= __y;
+  return __result;
+}
+
+template <class _CharT, class _Traits, size_t _Nb>
+basic_istream<_CharT, _Traits>&
+operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
+{
+  typedef typename _Traits::char_type char_type;
+  basic_string<_CharT, _Traits> __tmp;
+  __tmp.reserve(_Nb);
+
+  // Skip whitespace
+  typename basic_istream<_CharT, _Traits>::sentry __sentry(__is);
+  if (__sentry) {
+    basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
+    for (size_t __i = 0; __i < _Nb; ++__i) {
+      static typename _Traits::int_type __eof = _Traits::eof();
+
+      typename _Traits::int_type __c1 = __buf->sbumpc();
+      if (_Traits::eq_int_type(__c1, __eof)) {
+        __is.setstate(ios_base::eofbit);
+        break;
+      }
+      else {
+        char_type __c2 = _Traits::to_char_type(__c1);
+        char_type __c  = __is.narrow(__c2, '*');
+
+        if (__c == '0' || __c == '1')
+          __tmp.push_back(__c);
+        else if (_Traits::eq_int_type(__buf->sputbackc(__c2), __eof)) {
+          __is.setstate(ios_base::failbit);
+          break;
+        }
+      }
+    }
+
+    if (__tmp.empty())
+      __is.setstate(ios_base::failbit);
+    else
+      __x._M_copy_from_string(__tmp, static_cast<size_t>(0), _Nb);
+  }
+
+  return __is;
+}
+
+template <class _CharT, class _Traits, size_t _Nb>
+basic_ostream<_CharT, _Traits>&
+operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Nb>& __x)
+{
+  basic_string<_CharT, _Traits> __tmp;
+  __x._M_copy_to_string(__tmp);
+  return __os << __tmp;
+}
+
+} // namespace std
+
+#undef __BITSET_WORDS
+
+#endif /* __GLIBCPP_BITSET */
+
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/libstdc++-v3/include/std/std_complex.h b/libstdc++-v3/include/std/std_complex.h
new file mode 100644 (file)
index 0000000..18dd867
--- /dev/null
@@ -0,0 +1,1058 @@
+// The template and inlines for the -*- C++ -*- complex number classes.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 26.2  Complex Numbers
+// Note: this is not a conforming implementation.
+// Initially implemented by Ulrich Drepper <drepper@cygnus.com>
+// Improved by Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
+//
+
+/** @file std_complex.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_COMPLEX
+#define _CPP_COMPLEX   1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/cpp_type_traits.h>
+#include <cmath>
+#include <sstream>
+
+namespace std
+{
+  // Forward declarations
+  template<typename _Tp> class complex;
+  template<> class complex<float>;
+  template<> class complex<double>;
+  template<> class complex<long double>;
+
+  template<typename _Tp> _Tp abs(const complex<_Tp>&);
+  template<typename _Tp> _Tp arg(const complex<_Tp>&);
+  template<typename _Tp> _Tp norm(const complex<_Tp>&);
+
+  template<typename _Tp> complex<_Tp> conj(const complex<_Tp>&);
+  template<typename _Tp> complex<_Tp> polar(const _Tp&, const _Tp& = 0);
+
+  // Transcendentals:
+  template<typename _Tp> complex<_Tp> cos(const complex<_Tp>&);
+  template<typename _Tp> complex<_Tp> cosh(const complex<_Tp>&);
+  template<typename _Tp> complex<_Tp> exp(const complex<_Tp>&);
+  template<typename _Tp> complex<_Tp> log(const complex<_Tp>&);
+  template<typename _Tp> complex<_Tp> log10(const complex<_Tp>&);
+  template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, int);
+  template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, const _Tp&);
+  template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, 
+                                          const complex<_Tp>&);
+  template<typename _Tp> complex<_Tp> pow(const _Tp&, const complex<_Tp>&);
+  template<typename _Tp> complex<_Tp> sin(const complex<_Tp>&);
+  template<typename _Tp> complex<_Tp> sinh(const complex<_Tp>&);
+  template<typename _Tp> complex<_Tp> sqrt(const complex<_Tp>&);
+  template<typename _Tp> complex<_Tp> tan(const complex<_Tp>&);
+  template<typename _Tp> complex<_Tp> tanh(const complex<_Tp>&);
+    
+    
+  // 26.2.2  Primary template class complex
+  template<typename _Tp>
+    class complex
+    {
+    public:
+      typedef _Tp value_type;
+      
+      complex(const _Tp& = _Tp(), const _Tp & = _Tp());
+
+      // Let's the compiler synthetize the copy constructor   
+      // complex (const complex<_Tp>&);
+      template<typename _Up>
+        complex(const complex<_Up>&);
+        
+      _Tp real() const;
+      _Tp imag() const;
+
+      complex<_Tp>& operator=(const _Tp&);
+      complex<_Tp>& operator+=(const _Tp&);
+      complex<_Tp>& operator-=(const _Tp&);
+      complex<_Tp>& operator*=(const _Tp&);
+      complex<_Tp>& operator/=(const _Tp&);
+
+      // Let's the compiler synthetize the
+      // copy and assignment operator
+      // complex<_Tp>& operator= (const complex<_Tp>&);
+      template<typename _Up>
+        complex<_Tp>& operator=(const complex<_Up>&);
+      template<typename _Up>
+        complex<_Tp>& operator+=(const complex<_Up>&);
+      template<typename _Up>
+        complex<_Tp>& operator-=(const complex<_Up>&);
+      template<typename _Up>
+        complex<_Tp>& operator*=(const complex<_Up>&);
+      template<typename _Up>
+        complex<_Tp>& operator/=(const complex<_Up>&);
+
+    private:
+      _Tp _M_real, _M_imag;
+    };
+
+  template<typename _Tp>
+    inline _Tp
+    complex<_Tp>::real() const { return _M_real; }
+
+  template<typename _Tp>
+    inline _Tp
+    complex<_Tp>::imag() const { return _M_imag; }
+
+  template<typename _Tp>
+    inline 
+    complex<_Tp>::complex(const _Tp& __r, const _Tp& __i)
+    : _M_real(__r), _M_imag(__i) { }
+
+  template<typename _Tp>
+    template<typename _Up>
+    inline 
+    complex<_Tp>::complex(const complex<_Up>& __z)
+    : _M_real(__z.real()), _M_imag(__z.imag()) { }
+        
+  template<typename _Tp>
+    complex<_Tp>&
+    complex<_Tp>::operator=(const _Tp& __t)
+    {
+     _M_real = __t;
+     _M_imag = _Tp();
+     return *this;
+    } 
+
+  // 26.2.5/1
+  template<typename _Tp>
+    inline complex<_Tp>&
+    complex<_Tp>::operator+=(const _Tp& __t)
+    {
+      _M_real += __t;
+      return *this;
+    }
+
+  // 26.2.5/3
+  template<typename _Tp>
+    inline complex<_Tp>&
+    complex<_Tp>::operator-=(const _Tp& __t)
+    {
+      _M_real -= __t;
+      return *this;
+    }
+
+  // 26.2.5/5
+  template<typename _Tp>
+    complex<_Tp>&
+    complex<_Tp>::operator*=(const _Tp& __t)
+    {
+      _M_real *= __t;
+      _M_imag *= __t;
+      return *this;
+    }
+
+  // 26.2.5/7
+  template<typename _Tp>
+    complex<_Tp>&
+    complex<_Tp>::operator/=(const _Tp& __t)
+    {
+      _M_real /= __t;
+      _M_imag /= __t;
+      return *this;
+    }
+
+  template<typename _Tp>
+    template<typename _Up>
+    complex<_Tp>&
+    complex<_Tp>::operator=(const complex<_Up>& __z)
+    {
+      _M_real = __z.real();
+      _M_imag = __z.imag();
+      return *this;
+    }
+
+  // 26.2.5/9
+  template<typename _Tp>
+    template<typename _Up>
+    complex<_Tp>&
+    complex<_Tp>::operator+=(const complex<_Up>& __z)
+    {
+      _M_real += __z.real();
+      _M_imag += __z.imag();
+      return *this;
+    }
+
+  // 26.2.5/11
+  template<typename _Tp>
+    template<typename _Up>
+    complex<_Tp>&
+    complex<_Tp>::operator-=(const complex<_Up>& __z)
+    {
+      _M_real -= __z.real();
+      _M_imag -= __z.imag();
+      return *this;
+    }
+
+  // 26.2.5/13
+  // XXX: This is a grammar school implementation.
+  template<typename _Tp>
+    template<typename _Up>
+    complex<_Tp>&
+    complex<_Tp>::operator*=(const complex<_Up>& __z)
+    {
+      const _Tp __r = _M_real * __z.real() - _M_imag * __z.imag();
+      _M_imag = _M_real * __z.imag() + _M_imag * __z.real();
+      _M_real = __r;
+      return *this;
+    }
+
+  // 26.2.5/15
+  // XXX: This is a grammar school implementation.
+  template<typename _Tp>
+    template<typename _Up>
+    complex<_Tp>&
+    complex<_Tp>::operator/=(const complex<_Up>& __z)
+    {
+      const _Tp __r =  _M_real * __z.real() + _M_imag * __z.imag();
+      const _Tp __n = norm(__z);
+      _M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n;
+      _M_real = __r / __n;
+      return *this;
+    }
+    
+  // Operators:
+  template<typename _Tp>
+    inline complex<_Tp>
+    operator+(const complex<_Tp>& __x, const complex<_Tp>& __y)
+    { return complex<_Tp> (__x) += __y; }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    operator+(const complex<_Tp>& __x, const _Tp& __y)
+    { return complex<_Tp> (__x) += __y; }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    operator+(const _Tp& __x, const complex<_Tp>& __y)
+    { return complex<_Tp> (__y) += __x; }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
+    { return complex<_Tp> (__x) -= __y; }
+    
+  template<typename _Tp>
+    inline complex<_Tp>
+    operator-(const complex<_Tp>& __x, const _Tp& __y)
+    { return complex<_Tp> (__x) -= __y; }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    operator-(const _Tp& __x, const complex<_Tp>& __y)
+    { return complex<_Tp> (__x) -= __y; }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    operator*(const complex<_Tp>& __x, const complex<_Tp>& __y)
+    { return complex<_Tp> (__x) *= __y; }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    operator*(const complex<_Tp>& __x, const _Tp& __y)
+    { return complex<_Tp> (__x) *= __y; }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    operator*(const _Tp& __x, const complex<_Tp>& __y)
+    { return complex<_Tp> (__y) *= __x; }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    operator/(const complex<_Tp>& __x, const complex<_Tp>& __y)
+    { return complex<_Tp> (__x) /= __y; }
+    
+  template<typename _Tp>
+    inline complex<_Tp>
+    operator/(const complex<_Tp>& __x, const _Tp& __y)
+    { return complex<_Tp> (__x) /= __y; }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    operator/(const _Tp& __x, const complex<_Tp>& __y)
+    { return complex<_Tp> (__x) /= __y; }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    operator+(const complex<_Tp>& __x)
+    { return __x; }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    operator-(const complex<_Tp>& __x)
+    {  return complex<_Tp>(-__x.real(), -__x.imag()); }
+
+  template<typename _Tp>
+    inline bool
+    operator==(const complex<_Tp>& __x, const complex<_Tp>& __y)
+    { return __x.real() == __y.real() && __x.imag() == __y.imag(); }
+
+  template<typename _Tp>
+    inline bool
+    operator==(const complex<_Tp>& __x, const _Tp& __y)
+    { return __x.real() == __y && __x.imag() == _Tp(); }
+
+  template<typename _Tp>
+    inline bool
+    operator==(const _Tp& __x, const complex<_Tp>& __y)
+    { return __x == __y.real() && _Tp() == __y.imag(); }
+
+  template<typename _Tp>
+    inline bool
+    operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y)
+    { return __x.real() != __y.real() || __x.imag() != __y.imag(); }
+
+  template<typename _Tp>
+    inline bool
+    operator!=(const complex<_Tp>& __x, const _Tp& __y)
+    { return __x.real() != __y || __x.imag() != _Tp(); }
+
+  template<typename _Tp>
+    inline bool
+    operator!=(const _Tp& __x, const complex<_Tp>& __y)
+    { return __x != __y.real() || _Tp() != __y.imag(); }
+
+  template<typename _Tp, typename _CharT, class _Traits>
+    basic_istream<_CharT, _Traits>&
+    operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
+    {
+      _Tp __re_x, __im_x;
+      _CharT __ch;
+      __is >> __ch;
+      if (__ch == '(') 
+       {
+         __is >> __re_x >> __ch;
+         if (__ch == ',') 
+           {
+             __is >> __im_x >> __ch;
+             if (__ch == ')') 
+               __x = complex<_Tp>(__re_x, __im_x);
+             else
+               __is.setstate(ios_base::failbit);
+           }
+         else if (__ch == ')') 
+           __x = complex<_Tp>(__re_x, _Tp(0));
+         else
+           __is.setstate(ios_base::failbit);
+       }
+      else 
+       {
+         __is.putback(__ch);
+         __is >> __re_x;
+         __x = complex<_Tp>(__re_x, _Tp(0));
+       }
+      return __is;
+    }
+
+  template<typename _Tp, typename _CharT, class _Traits>
+    basic_ostream<_CharT, _Traits>&
+    operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
+    {
+      basic_ostringstream<_CharT, _Traits> __s;
+      __s.flags(__os.flags());
+      __s.imbue(__os.getloc());
+      __s.precision(__os.precision());
+      __s << '(' << __x.real() << "," << __x.imag() << ')';
+      return __os << __s.str();
+    }
+
+  // Values
+  template<typename _Tp>
+    inline _Tp
+    real(const complex<_Tp>& __z)
+    { return __z.real(); }
+    
+  template<typename _Tp>
+    inline _Tp
+    imag(const complex<_Tp>& __z)
+    { return __z.imag(); }
+
+  template<typename _Tp>
+    inline _Tp
+    abs(const complex<_Tp>& __z)
+    {
+      _Tp __x = __z.real();
+      _Tp __y = __z.imag();
+      const _Tp __s = max(abs(__x), abs(__y));
+      if (__s == _Tp())  // well ...
+        return __s;
+      __x /= __s; 
+      __y /= __s;
+      return __s * sqrt(__x * __x + __y * __y);
+    }
+
+  template<typename _Tp>
+    inline _Tp
+    arg(const complex<_Tp>& __z)
+    { return atan2(__z.imag(), __z.real()); }
+
+  // 26.2.7/5: norm(__z) returns the squared magintude of __z.
+  //     As defined, norm() is -not- a norm is the common mathematical
+  //     sens used in numerics.  The helper class _Norm_helper<> tries to
+  //     distinguish between builtin floating point and the rest, so as
+  //     to deliver an answer as close as possible to the real value.
+  template<bool>
+    struct _Norm_helper
+    {
+      template<typename _Tp>
+        static inline _Tp _S_do_it(const complex<_Tp>& __z)
+        {
+          const _Tp __x = __z.real();
+          const _Tp __y = __z.imag();
+          return __x * __x + __y * __y;
+        }
+    };
+
+  template<>
+    struct _Norm_helper<true>
+    {
+      template<typename _Tp>
+        static inline _Tp _S_do_it(const complex<_Tp>& __z)
+        {
+          _Tp __res = abs(__z);
+          return __res * __res;
+        }
+    };
+  
+  template<typename _Tp>
+    inline _Tp
+    norm(const complex<_Tp>& __z)
+    {
+      return _Norm_helper<__is_floating<_Tp>::_M_type>::_S_do_it(__z);
+    }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    polar(const _Tp& __rho, const _Tp& __theta)
+    { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    conj(const complex<_Tp>& __z)
+    { return complex<_Tp>(__z.real(), -__z.imag()); }
+  
+  // Transcendentals
+  template<typename _Tp>
+    inline complex<_Tp>
+    cos(const complex<_Tp>& __z)
+    {
+      const _Tp __x = __z.real();
+      const _Tp __y = __z.imag();
+      return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y));
+    }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    cosh(const complex<_Tp>& __z)
+    {
+      const _Tp __x = __z.real();
+      const _Tp __y = __z.imag();
+      return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y));
+    }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    exp(const complex<_Tp>& __z)
+    { return polar(exp(__z.real()), __z.imag()); }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    log(const complex<_Tp>& __z)
+    { return complex<_Tp>(log(abs(__z)), arg(__z)); }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    log10(const complex<_Tp>& __z)
+    { return log(__z) / log(_Tp(10.0)); }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    sin(const complex<_Tp>& __z)
+    {
+      const _Tp __x = __z.real();
+      const _Tp __y = __z.imag();
+      return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y)); 
+    }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    sinh(const complex<_Tp>& __z)
+    {
+      const _Tp __x = __z.real();
+      const _Tp  __y = __z.imag();
+      return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y));
+    }
+
+  template<typename _Tp>
+    complex<_Tp>
+    sqrt(const complex<_Tp>& __z)
+    {
+      _Tp __x = __z.real();
+      _Tp __y = __z.imag();
+
+      if (__x == _Tp())
+        {
+          _Tp __t = sqrt(abs(__y) / 2);
+          return complex<_Tp>(__t, __y < _Tp() ? -__t : __t);
+        }
+      else
+        {
+          _Tp __t = sqrt(2 * (abs(__z) + abs(__x)));
+          _Tp __u = __t / 2;
+          return __x > _Tp()
+            ? complex<_Tp>(__u, __y / __t)
+            : complex<_Tp>(abs(__y) / __t, __y < _Tp() ? -__u : __u);
+        }
+    }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    tan(const complex<_Tp>& __z)
+    {
+      return sin(__z) / cos(__z);
+    }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    tanh(const complex<_Tp>& __z)
+    {
+      return sinh(__z) / cosh(__z);
+    }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    pow(const complex<_Tp>& __z, int __n)
+    {
+      return __pow_helper(__z, __n);
+    }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    pow(const complex<_Tp>& __x, const _Tp& __y)
+    {
+      return exp(__y * log(__x));
+    }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
+    {
+      return exp(__y * log(__x));
+    }
+
+  template<typename _Tp>
+    inline complex<_Tp>
+    pow(const _Tp& __x, const complex<_Tp>& __y)
+    {
+      return exp(__y * log(__x));
+    }
+
+  // 26.2.3  complex specializations
+  // complex<float> specialization
+  template<> class complex<float>
+  {
+  public:
+    typedef float value_type;
+    
+    complex(float = 0.0f, float = 0.0f);
+#ifdef _GLIBCPP_BUGGY_COMPLEX
+    complex(const complex& __z) : _M_value(__z._M_value) { }
+#endif
+    explicit complex(const complex<double>&);
+    explicit complex(const complex<long double>&);
+
+    float real() const;
+    float imag() const;
+
+    complex<float>& operator=(float);
+    complex<float>& operator+=(float);
+    complex<float>& operator-=(float);
+    complex<float>& operator*=(float);
+    complex<float>& operator/=(float);
+        
+    // Let's the compiler synthetize the copy and assignment
+    // operator.  It always does a pretty good job.
+    // complex& operator= (const complex&);
+    template<typename _Tp>
+      complex<float>&operator=(const complex<_Tp>&);
+    template<typename _Tp>
+      complex<float>& operator+=(const complex<_Tp>&);
+    template<class _Tp>
+      complex<float>& operator-=(const complex<_Tp>&);
+    template<class _Tp>
+      complex<float>& operator*=(const complex<_Tp>&);
+    template<class _Tp>
+      complex<float>&operator/=(const complex<_Tp>&);
+
+  private:
+    typedef __complex__ float _ComplexT;
+    _ComplexT _M_value;
+
+    complex(_ComplexT __z) : _M_value(__z) { }
+        
+    friend class complex<double>;
+    friend class complex<long double>;
+  };
+
+  inline float
+  complex<float>::real() const
+  { return __real__ _M_value; }
+
+  inline float
+  complex<float>::imag() const
+  { return __imag__ _M_value; }
+
+  inline
+  complex<float>::complex(float r, float i)
+  {
+    __real__ _M_value = r;
+    __imag__ _M_value = i;
+  }
+
+  inline complex<float>&
+  complex<float>::operator=(float __f)
+  {
+    __real__ _M_value = __f;
+    __imag__ _M_value = 0.0f;
+    return *this;
+  }
+
+  inline complex<float>&
+  complex<float>::operator+=(float __f)
+  {
+    __real__ _M_value += __f;
+    return *this;
+  }
+
+  inline complex<float>&
+  complex<float>::operator-=(float __f)
+  {
+    __real__ _M_value -= __f;
+    return *this;
+  }
+
+  inline complex<float>&
+  complex<float>::operator*=(float __f)
+  {
+    _M_value *= __f;
+    return *this;
+  }
+
+  inline complex<float>&
+  complex<float>::operator/=(float __f)
+  {
+    _M_value /= __f;
+    return *this;
+  }
+
+  template<typename _Tp>
+  inline complex<float>&
+  complex<float>::operator=(const complex<_Tp>& __z)
+  {
+    __real__ _M_value = __z.real();
+    __imag__ _M_value = __z.imag();
+    return *this;
+  }
+
+  template<typename _Tp>
+  inline complex<float>&
+  complex<float>::operator+=(const complex<_Tp>& __z)
+  {
+    __real__ _M_value += __z.real();
+    __imag__ _M_value += __z.imag();
+    return *this;
+  }
+    
+  template<typename _Tp>
+    inline complex<float>&
+    complex<float>::operator-=(const complex<_Tp>& __z)
+    {
+     __real__ _M_value -= __z.real();
+     __imag__ _M_value -= __z.imag();
+     return *this;
+    } 
+
+  template<typename _Tp>
+    inline complex<float>&
+    complex<float>::operator*=(const complex<_Tp>& __z)
+    {
+      _ComplexT __t;
+      __real__ __t = __z.real();
+      __imag__ __t = __z.imag();
+      _M_value *= __t;
+      return *this;
+    }
+
+  template<typename _Tp>
+    inline complex<float>&
+    complex<float>::operator/=(const complex<_Tp>& __z)
+    {
+      _ComplexT __t;
+      __real__ __t = __z.real();
+      __imag__ __t = __z.imag();
+      _M_value /= __t;
+      return *this;
+    }
+
+  // 26.2.3  complex specializations
+  // complex<double> specialization
+  template<> class complex<double>
+  {
+  public:
+    typedef double value_type;
+
+    complex(double  =0.0, double =0.0);
+#ifdef _GLIBCPP_BUGGY_COMPLEX
+    complex(const complex& __z) : _M_value(__z._M_value) { }
+#endif
+    complex(const complex<float>&);
+    explicit complex(const complex<long double>&);
+        
+    double real() const;
+    double imag() const;
+        
+    complex<double>& operator=(double);
+    complex<double>& operator+=(double);
+    complex<double>& operator-=(double);
+    complex<double>& operator*=(double);
+    complex<double>& operator/=(double);
+
+    // The compiler will synthetize this, efficiently.
+    // complex& operator= (const complex&);
+    template<typename _Tp>
+      complex<double>& operator=(const complex<_Tp>&);
+    template<typename _Tp>
+      complex<double>& operator+=(const complex<_Tp>&);
+    template<typename _Tp>
+      complex<double>& operator-=(const complex<_Tp>&);
+    template<typename _Tp>
+      complex<double>& operator*=(const complex<_Tp>&);
+    template<typename _Tp>
+      complex<double>& operator/=(const complex<_Tp>&);
+
+  private:
+    typedef __complex__ double _ComplexT;
+    _ComplexT _M_value;
+
+    complex(_ComplexT __z) : _M_value(__z) { }
+        
+    friend class complex<float>;
+    friend class complex<long double>;
+  };
+
+  inline double
+  complex<double>::real() const
+  { return __real__ _M_value; }
+
+  inline double
+  complex<double>::imag() const
+  { return __imag__ _M_value; }
+
+  inline
+  complex<double>::complex(double __r, double __i)
+  {
+    __real__ _M_value = __r;
+    __imag__ _M_value = __i;
+  }
+
+  inline complex<double>&
+  complex<double>::operator=(double __d)
+  {
+    __real__ _M_value = __d;
+    __imag__ _M_value = 0.0;
+    return *this;
+  }
+
+  inline complex<double>&
+  complex<double>::operator+=(double __d)
+  {
+    __real__ _M_value += __d;
+    return *this;
+  }
+
+  inline complex<double>&
+  complex<double>::operator-=(double __d)
+  {
+    __real__ _M_value -= __d;
+    return *this;
+  }
+
+  inline complex<double>&
+  complex<double>::operator*=(double __d)
+  {
+    _M_value *= __d;
+    return *this;
+  }
+
+  inline complex<double>&
+  complex<double>::operator/=(double __d)
+  {
+    _M_value /= __d;
+    return *this;
+  }
+
+  template<typename _Tp>
+    inline complex<double>&
+    complex<double>::operator=(const complex<_Tp>& __z)
+    {
+      __real__ _M_value = __z.real();
+      __imag__ _M_value = __z.imag();
+      return *this;
+    }
+    
+  template<typename _Tp>
+    inline complex<double>&
+    complex<double>::operator+=(const complex<_Tp>& __z)
+    {
+      __real__ _M_value += __z.real();
+      __imag__ _M_value += __z.imag();
+      return *this;
+    }
+
+  template<typename _Tp>
+    inline complex<double>&
+    complex<double>::operator-=(const complex<_Tp>& __z)
+    {
+      __real__ _M_value -= __z.real();
+      __imag__ _M_value -= __z.imag();
+      return *this;
+    }
+
+  template<typename _Tp>
+    inline complex<double>&
+    complex<double>::operator*=(const complex<_Tp>& __z)
+    {
+      _ComplexT __t;
+      __real__ __t = __z.real();
+      __imag__ __t = __z.imag();
+      _M_value *= __t;
+      return *this;
+    }
+
+  template<typename _Tp>
+    inline complex<double>&
+    complex<double>::operator/=(const complex<_Tp>& __z)
+    {
+      _ComplexT __t;
+      __real__ __t = __z.real();
+      __imag__ __t = __z.imag();
+      _M_value /= __t;
+      return *this;
+    }
+
+  // 26.2.3  complex specializations
+  // complex<long double> specialization
+  template<> class complex<long double>
+  {
+  public:
+    typedef long double value_type;
+
+    complex(long double = 0.0L, long double = 0.0L);
+#ifdef _GLIBCPP_BUGGY_COMPLEX
+    complex(const complex& __z) : _M_value(__z._M_value) { }
+#endif
+    complex(const complex<float>&);
+    complex(const complex<double>&);
+
+    long double real() const;
+    long double imag() const;
+
+    complex<long double>& operator= (long double);
+    complex<long double>& operator+= (long double);
+    complex<long double>& operator-= (long double);
+    complex<long double>& operator*= (long double);
+    complex<long double>& operator/= (long double);
+
+    // The compiler knows how to do this efficiently
+    // complex& operator= (const complex&);
+    template<typename _Tp>
+      complex<long double>& operator=(const complex<_Tp>&);
+    template<typename _Tp>
+      complex<long double>& operator+=(const complex<_Tp>&);
+    template<typename _Tp>
+      complex<long double>& operator-=(const complex<_Tp>&);
+    template<typename _Tp>
+      complex<long double>& operator*=(const complex<_Tp>&);
+    template<typename _Tp>
+      complex<long double>& operator/=(const complex<_Tp>&);
+
+  private:
+    typedef __complex__ long double _ComplexT;
+    _ComplexT _M_value;
+
+    complex(_ComplexT __z) : _M_value(__z) { }
+
+    friend class complex<float>;
+    friend class complex<double>;
+  };
+
+  inline
+  complex<long double>::complex(long double __r, long double __i)
+  {
+    __real__ _M_value = __r;
+    __imag__ _M_value = __i;
+  }
+
+  inline long double
+  complex<long double>::real() const
+  { return __real__ _M_value; }
+
+  inline long double
+  complex<long double>::imag() const
+  { return __imag__ _M_value; }
+
+  inline complex<long double>&   
+  complex<long double>::operator=(long double __r)
+  {
+    __real__ _M_value = __r;
+    __imag__ _M_value = 0.0L;
+    return *this;
+  }
+
+  inline complex<long double>&
+  complex<long double>::operator+=(long double __r)
+  {
+    __real__ _M_value += __r;
+    return *this;
+  }
+
+  inline complex<long double>&
+  complex<long double>::operator-=(long double __r)
+  {
+    __real__ _M_value -= __r;
+    return *this;
+  }
+
+  inline complex<long double>&
+  complex<long double>::operator*=(long double __r)
+  {
+    _M_value *= __r;
+    return *this;
+  }
+
+  inline complex<long double>&
+  complex<long double>::operator/=(long double __r)
+  {
+    _M_value /= __r;
+    return *this;
+  }
+
+  template<typename _Tp>
+    inline complex<long double>&
+    complex<long double>::operator=(const complex<_Tp>& __z)
+    {
+      __real__ _M_value = __z.real();
+      __imag__ _M_value = __z.imag();
+      return *this;
+    }
+
+  template<typename _Tp>
+    inline complex<long double>&
+    complex<long double>::operator+=(const complex<_Tp>& __z)
+    {
+      __real__ _M_value += __z.real();
+      __imag__ _M_value += __z.imag();
+      return *this;
+    }
+
+  template<typename _Tp>
+    inline complex<long double>&
+    complex<long double>::operator-=(const complex<_Tp>& __z)
+    {
+      __real__ _M_value -= __z.real();
+      __imag__ _M_value -= __z.imag();
+      return *this;
+    }
+    
+  template<typename _Tp>
+    inline complex<long double>&
+    complex<long double>::operator*=(const complex<_Tp>& __z)
+    {
+      _ComplexT __t;
+      __real__ __t = __z.real();
+      __imag__ __t = __z.imag();
+      _M_value *= __t;
+      return *this;
+    }
+
+  template<typename _Tp>
+    inline complex<long double>&
+    complex<long double>::operator/=(const complex<_Tp>& __z)
+    {
+      _ComplexT __t;
+      __real__ __t = __z.real();
+      __imag__ __t = __z.imag();
+      _M_value /= __t;
+      return *this;
+    }
+
+  // These bits have to be at the end of this file, so that the
+  // specializations have all been defined.
+  // ??? No, they have to be there because of compiler limitation at
+  // inlining.  It suffices that class specializations be defined.
+  inline
+  complex<float>::complex(const complex<double>& __z)
+  : _M_value(_ComplexT(__z._M_value)) { }
+
+  inline
+  complex<float>::complex(const complex<long double>& __z)
+  : _M_value(_ComplexT(__z._M_value)) { }
+
+  inline
+  complex<double>::complex(const complex<float>& __z) 
+  : _M_value(_ComplexT(__z._M_value)) { }
+
+  inline
+  complex<double>::complex(const complex<long double>& __z)
+  {
+    __real__ _M_value = __z.real();
+    __imag__ _M_value = __z.imag();
+  }
+
+  inline
+  complex<long double>::complex(const complex<float>& __z)
+  : _M_value(_ComplexT(__z._M_value)) { }
+
+  inline
+  complex<long double>::complex(const complex<double>& __z)
+  : _M_value(_ComplexT(__z._M_value)) { }
+} // namespace std
+
+#endif /* _CPP_COMPLEX */
diff --git a/libstdc++-v3/include/std/std_deque.h b/libstdc++-v3/include/std/std_deque.h
new file mode 100644 (file)
index 0000000..394eef3
--- /dev/null
@@ -0,0 +1,77 @@
+// <deque> -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file std_deque.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_DEQUE
+#define _CPP_DEQUE 1
+
+#pragma GCC system_header
+
+#include <bits/functexcept.h>
+#include <bits/stl_algobase.h>
+#include <bits/stl_alloc.h>
+#include <bits/stl_construct.h>
+#include <bits/stl_uninitialized.h>
+#include <bits/stl_deque.h>
+
+#endif /* _CPP_DEQUE */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/libstdc++-v3/include/std/std_fstream.h b/libstdc++-v3/include/std/std_fstream.h
new file mode 100644 (file)
index 0000000..a04ddf0
--- /dev/null
@@ -0,0 +1,433 @@
+// File based streams -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.8  File-based streams
+//
+
+/** @file std_fstream.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_FSTREAM
+#define _CPP_FSTREAM   1
+
+#pragma GCC system_header
+
+#include <istream>
+#include <ostream>
+#include <bits/basic_file.h>
+#include <locale>      // For codecvt
+#include <bits/gthr.h>
+
+namespace std 
+{
+  template<typename _CharT, typename _Traits>
+    class basic_filebuf : public basic_streambuf<_CharT, _Traits>
+    {
+    public:
+      // Types:
+      typedef _CharT                                   char_type;
+      typedef _Traits                                  traits_type;
+      typedef typename traits_type::int_type           int_type;
+      typedef typename traits_type::pos_type           pos_type;
+      typedef typename traits_type::off_type           off_type;
+      
+      // Non-standard Types:
+      typedef basic_streambuf<char_type, traits_type>          __streambuf_type;
+      typedef basic_filebuf<char_type, traits_type>     __filebuf_type;
+      typedef __basic_file<char_type>                  __file_type;
+      typedef typename traits_type::state_type          __state_type;
+      typedef codecvt<char_type, char, __state_type>    __codecvt_type;
+      typedef typename __codecvt_type::result          __res_type;
+      typedef ctype<char_type>                          __ctype_type;
+
+      friend class ios_base; // For sync_with_stdio.
+
+    private:
+      // Data Members:
+      // External buffer.
+      __file_type*             _M_file;
+
+      // Current and beginning state type for codecvt.
+      __state_type             _M_state_cur;
+      __state_type             _M_state_beg;   
+
+      // MT lock inherited from libio or other low-level io library.
+      __c_lock                 _M_lock;
+
+      // Set iff _M_buf is allocated memory from _M_allocate_internal_buffer..
+      bool                     _M_buf_allocated;
+
+      // XXX Needed? 
+      bool                     _M_last_overflowed;  
+  
+    public:
+      // Constructors/destructor:
+      basic_filebuf();
+
+      // Non-standard ctor:
+      basic_filebuf(__c_file_type* __f, ios_base::openmode __mode, 
+                   int_type __s = static_cast<int_type>(BUFSIZ));
+      // Non-standard member:
+      int
+      fd();
+
+      virtual 
+      ~basic_filebuf() 
+      { 
+       this->close();
+       _M_last_overflowed = false;
+      }
+
+      // Members:
+      bool 
+      is_open(void) const { return _M_file ? _M_file->is_open() : false; }
+    
+      __filebuf_type* 
+      open(const char* __s, ios_base::openmode __mode);
+    
+      __filebuf_type* 
+      close(void);
+
+    protected:
+      void 
+      _M_allocate_internal_buffer();
+
+      void 
+      _M_destroy_internal_buffer();
+
+      void 
+      _M_allocate_pback_buffer();
+
+      // Create __file_type object and initialize it properly.
+      void
+      _M_allocate_file();
+
+      // Overridden virtual functions:
+      virtual streamsize 
+      showmanyc(void);
+   
+      // Stroustrup, 1998, p. 628 
+      // underflow() and uflow() functions are called to get the next
+      // charater from the real input source when the buffer is empty.
+      // Buffered input uses underflow()
+      virtual int_type 
+      underflow(void);
+
+      virtual int_type 
+      pbackfail(int_type __c = _Traits::eof());
+
+      // NB: For what the standard expects of the overflow function,
+      // see _M_really_overflow(), below. Because basic_streambuf's
+      // sputc/sputn call overflow directly, and the complications of
+      // this implementation's setting of the initial pointers all
+      // equal to _M_buf when initializing, it seems essential to have
+      // this in actuality be a helper function that checks for the
+      // eccentricities of this implementation, and then call
+      // overflow() if indeed the buffer is full.
+      virtual int_type 
+      overflow(int_type __c = _Traits::eof());
+
+      // Stroustrup, 1998, p 648
+      // The overflow() function is called to transfer characters to the
+      // real output destination when the buffer is full. A call to
+      // overflow(c) outputs the contents of the buffer plus the
+      // character c.
+      // 27.5.2.4.5 
+      // Consume some sequence of the characters in the pending sequence.
+      int_type 
+      _M_really_overflow(int_type __c = _Traits::eof());
+    
+      virtual __streambuf_type* 
+      setbuf(char_type* __s, streamsize __n);
+    
+      virtual pos_type 
+      seekoff(off_type __off, ios_base::seekdir __way,
+             ios_base::openmode __mode = ios_base::in | ios_base::out);
+
+      virtual pos_type 
+      seekpos(pos_type __pos,
+             ios_base::openmode __mode = ios_base::in | ios_base::out);
+
+      virtual int 
+      sync(void)
+      {
+       bool __testput = _M_out_cur && _M_out_beg < _M_out_end;
+
+       // Make sure that the internal buffer resyncs its idea of
+       // the file position with the external file.
+       if (__testput && !_M_file->sync())
+         {
+           // Need to restore current position. This interpreted as
+           // the position of the external byte sequence (_M_file)
+           // plus the offset in the current internal buffer
+           // (_M_out_beg - _M_out_cur)
+           streamoff __cur = _M_file->seekoff(0, ios_base::cur);
+           off_type __off = _M_out_cur - _M_out_beg;
+           _M_really_overflow();
+           _M_file->seekpos(__cur + __off);
+         }
+       _M_last_overflowed = false;     
+       return 0;
+      }
+      
+      virtual void 
+      imbue(const locale& __loc);
+
+      virtual streamsize 
+      xsgetn(char_type* __s, streamsize __n)
+      {
+       streamsize __ret = 0;
+       // Clear out pback buffer before going on to the real deal...
+       if (_M_pback_init)
+         {
+           while (__ret < __n && _M_in_cur < _M_in_end)
+             {
+               *__s = *_M_in_cur;
+               ++__ret;
+               ++__s;
+               ++_M_in_cur;
+             }
+           _M_pback_destroy();
+         }
+       if (__ret < __n)
+         __ret += __streambuf_type::xsgetn(__s, __n - __ret);
+       return __ret;
+      }
+      virtual streamsize 
+      xsputn(const char_type* __s, streamsize __n)
+      {
+       _M_pback_destroy();
+       return __streambuf_type::xsputn(__s, __n);
+      }
+       
+      void
+      _M_output_unshift();
+    };
+
+
+  // 27.8.1.5  Template class basic_ifstream
+  template<typename _CharT, typename _Traits>
+    class basic_ifstream : public basic_istream<_CharT, _Traits>
+    {
+    public:
+      // Types:
+      typedef _CharT                                   char_type;
+      typedef _Traits                                  traits_type;
+      typedef typename traits_type::int_type           int_type;
+      typedef typename traits_type::pos_type           pos_type;
+      typedef typename traits_type::off_type           off_type;
+
+      // Non-standard types:
+      typedef basic_filebuf<char_type, traits_type>    __filebuf_type;
+      typedef basic_istream<char_type, traits_type>    __istream_type;
+    
+    private:
+      __filebuf_type   _M_filebuf;
+
+    public:
+     // Constructors/Destructors:
+      basic_ifstream()
+      : __istream_type(NULL), _M_filebuf()
+      { this->init(&_M_filebuf); }
+
+      explicit 
+      basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in)
+      : __istream_type(NULL), _M_filebuf()
+      { 
+       this->init(&_M_filebuf); 
+       this->open(__s, __mode); 
+      }
+    
+      ~basic_ifstream()
+      { }
+
+      // Members:
+      __filebuf_type* 
+      rdbuf() const 
+      { return const_cast<__filebuf_type*>(&_M_filebuf); }
+
+      bool 
+      is_open(void) { return _M_filebuf.is_open(); }
+
+      void 
+      open(const char* __s, ios_base::openmode __mode = ios_base::in)
+      { 
+       if (_M_filebuf.open(__s, __mode | ios_base::in) == NULL)
+         this->setstate(ios_base::failbit); 
+      }
+
+      void 
+      close(void)
+      { 
+       if (!_M_filebuf.close())
+         this->setstate(ios_base::failbit);    
+      }
+    };
+
+  
+  // 27.8.1.8  Template class basic_ofstream
+  template<typename _CharT, typename _Traits>
+    class basic_ofstream : public basic_ostream<_CharT,_Traits>
+    {
+    public:
+      // Types:
+      typedef _CharT                                   char_type;
+      typedef _Traits                                  traits_type;
+      typedef typename traits_type::int_type           int_type;
+      typedef typename traits_type::pos_type           pos_type;
+      typedef typename traits_type::off_type           off_type;
+
+      // Non-standard types:
+      typedef basic_filebuf<char_type, traits_type>    __filebuf_type;
+      typedef basic_ostream<char_type, traits_type>    __ostream_type;
+      
+    private:
+      __filebuf_type   _M_filebuf;
+
+    public:
+      // Constructors:
+      basic_ofstream()
+      : __ostream_type(NULL), _M_filebuf()
+      { this->init(&_M_filebuf); }
+      
+      explicit 
+      basic_ofstream(const char* __s, 
+                    ios_base::openmode __mode = ios_base::out|ios_base::trunc)
+      : __ostream_type(NULL), _M_filebuf()
+      { 
+       this->init(&_M_filebuf); 
+       this->open(__s, __mode); 
+      }
+
+      ~basic_ofstream()
+      { }
+
+      // Members:
+      __filebuf_type* 
+      rdbuf(void) const
+      { return const_cast<__filebuf_type*>(&_M_filebuf); }
+      bool 
+      is_open(void) { return _M_filebuf.is_open(); }
+
+      void 
+      open(const char* __s, 
+          ios_base::openmode __mode = ios_base::out | ios_base::trunc)
+      { 
+       if (!_M_filebuf.open(__s, __mode | ios_base::out))
+         this->setstate(ios_base::failbit); 
+      }
+
+      void 
+      close(void)
+      { 
+       if (!_M_filebuf.close())
+         this->setstate(ios_base::failbit); 
+      }
+    };
+
+
+  // 27.8.1.11  Template class basic_fstream
+  template<typename _CharT, typename _Traits>
+    class basic_fstream : public basic_iostream<_CharT, _Traits>
+    {
+    public:
+      // Types:
+      typedef _CharT                                   char_type;
+      typedef _Traits                                  traits_type;
+      typedef typename traits_type::int_type           int_type;
+      typedef typename traits_type::pos_type           pos_type;
+      typedef typename traits_type::off_type           off_type;
+
+      // Non-standard types:
+      typedef basic_filebuf<char_type, traits_type>    __filebuf_type;
+      typedef basic_ios<char_type, traits_type>                __ios_type;
+      typedef basic_iostream<char_type, traits_type>   __iostream_type;
+
+    private:
+      __filebuf_type   _M_filebuf;
+      
+    public:
+      // Constructors/destructor:
+      basic_fstream()
+      : __iostream_type(NULL), _M_filebuf()
+      { this->init(&_M_filebuf); }
+
+      explicit 
+      basic_fstream(const char* __s,
+                   ios_base::openmode __mode = ios_base::in | ios_base::out)
+      : __iostream_type(NULL), _M_filebuf()
+      { 
+       this->init(&_M_filebuf); 
+       this->open(__s, __mode); 
+      }
+      ~basic_fstream()
+      { }
+    
+      // Members:
+      __filebuf_type* 
+      rdbuf(void) const 
+      { return const_cast<__filebuf_type*>(&_M_filebuf); }
+
+      bool 
+      is_open(void) { return _M_filebuf.is_open(); }
+
+      void 
+      open(const char* __s, 
+          ios_base::openmode __mode = ios_base::in | ios_base::out)
+      { 
+       if (!_M_filebuf.open(__s, __mode))
+         setstate(ios_base::failbit); 
+      }
+
+      void 
+      close(void)
+      { 
+       if (!_M_filebuf.close())
+         setstate(ios_base::failbit); 
+      }
+    };
+} // namespace std
+
+
+#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
+# define export
+#ifdef  _GLIBCPP_FULLY_COMPLIANT_HEADERS
+# include <bits/fstream.tcc>
+#endif
+#endif
+
+#endif 
+
diff --git a/libstdc++-v3/include/std/std_functional.h b/libstdc++-v3/include/std/std_functional.h
new file mode 100644 (file)
index 0000000..16702ca
--- /dev/null
@@ -0,0 +1,62 @@
+// <functional> -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/*
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file std_functional.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_FUNCTIONAL
+#define _CPP_FUNCTIONAL 1
+
+#pragma GCC system_header
+#include <bits/c++config.h>
+#include <cstddef>
+#include <bits/stl_function.h>
+
+#endif /* _CPP_FUNCTIONAL */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/libstdc++-v3/include/std/std_iomanip.h b/libstdc++-v3/include/std/std_iomanip.h
new file mode 100644 (file)
index 0000000..ab279d2
--- /dev/null
@@ -0,0 +1,221 @@
+// Standard stream manipulators -*- C++ -*-
+
+// Copyright (C) 1997-1999, 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.6.3  Standard manipulators
+//
+
+/** @file std_iomanip.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_IOMANIP
+#define _CPP_IOMANIP 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <istream>
+#include <functional>
+
+namespace std
+{
+
+  struct _Resetiosflags { ios_base::fmtflags _M_mask; };
+
+  inline _Resetiosflags 
+  resetiosflags(ios_base::fmtflags __mask)
+  { 
+    _Resetiosflags __x; 
+    __x._M_mask = __mask; 
+    return __x; 
+  }
+
+  template <class _CharT, class _Traits>
+    basic_istream<_CharT,_Traits>& 
+    operator>>(basic_istream<_CharT,_Traits>& __is, _Resetiosflags __f)
+    { 
+      __is.setf(ios_base::fmtflags(0), __f._M_mask); 
+      return __is; 
+    }
+
+  template <class _CharT, class _Traits>
+    basic_ostream<_CharT,_Traits>& 
+    operator<<(basic_ostream<_CharT,_Traits>& __os, _Resetiosflags __f)
+    { 
+      __os.setf(ios_base::fmtflags(0), __f._M_mask); 
+      return __os; 
+    }
+
+
+  struct _Setiosflags { ios_base::fmtflags _M_mask; };
+
+  inline _Setiosflags 
+  setiosflags(ios_base::fmtflags __mask)
+  { 
+    _Setiosflags __x; 
+    __x._M_mask = __mask; 
+    return __x; 
+  }
+
+  template <class _CharT, class _Traits>
+    basic_istream<_CharT,_Traits>& 
+    operator>>(basic_istream<_CharT,_Traits>& __is, _Setiosflags __f)
+    { 
+      __is.setf(__f._M_mask); 
+      return __is; 
+    }
+
+  template <class _CharT, class _Traits>
+    basic_ostream<_CharT,_Traits>& 
+    operator<<(basic_ostream<_CharT,_Traits>& __os, _Setiosflags __f)
+    { 
+      __os.setf(__f._M_mask); 
+      return __os; 
+    }
+
+
+  struct _Setbase { int _M_base; };
+
+  inline _Setbase 
+  setbase(int __base)
+  { 
+    _Setbase __x; 
+    __x._M_base = __base; 
+    return __x; 
+  }
+
+  template <class _CharT, class _Traits>
+    basic_istream<_CharT,_Traits>& 
+    operator>>(basic_istream<_CharT,_Traits>& __is, _Setbase __f)
+    {
+      __is.setf(__f._M_base ==  8 ? ios_base::oct : 
+             __f._M_base == 10 ? ios_base::dec : 
+             __f._M_base == 16 ? ios_base::hex : 
+             ios_base::fmtflags(0), ios_base::basefield);
+      return __is; 
+    }
+  
+  template <class _CharT, class _Traits>
+    basic_ostream<_CharT,_Traits>& 
+    operator<<(basic_ostream<_CharT,_Traits>& __os, _Setbase __f)
+    {
+      __os.setf(__f._M_base ==  8 ? ios_base::oct : 
+               __f._M_base == 10 ? ios_base::dec : 
+               __f._M_base == 16 ? ios_base::hex : 
+               ios_base::fmtflags(0), ios_base::basefield);
+      return __os; 
+    }
+  
+
+  template<class _CharT> 
+    struct _Setfill { _CharT _M_c; };
+
+  template<class _CharT> 
+    _Setfill<_CharT> 
+    setfill(_CharT __c)
+    { 
+      _Setfill<_CharT> __x; 
+      __x._M_c = __c; 
+      return __x; 
+    }
+
+  template <class _CharT, class _Traits>
+    basic_istream<_CharT,_Traits>& 
+    operator>>(basic_istream<_CharT,_Traits>& __is, _Setfill<_CharT> __f)
+    { 
+      __is.fill(__f._M_c); 
+      return __is; 
+    }
+
+  template <class _CharT, class _Traits>
+    basic_ostream<_CharT,_Traits>& 
+    operator<<(basic_ostream<_CharT,_Traits>& __os, _Setfill<_CharT> __f)
+    { 
+      __os.fill(__f._M_c); 
+      return __os; 
+    }
+
+
+  struct _Setprecision { int _M_n; };
+
+  inline _Setprecision 
+  setprecision(int __n)
+  { 
+    _Setprecision __x; 
+    __x._M_n = __n; 
+    return __x; 
+  }
+
+  template <class _CharT, class _Traits>
+    basic_istream<_CharT,_Traits>& 
+    operator>>(basic_istream<_CharT,_Traits>& __is, _Setprecision __f)
+    { 
+      __is.precision(__f._M_n); 
+      return __is; 
+    }
+
+  template <class _CharT, class _Traits>
+    basic_ostream<_CharT,_Traits>& 
+    operator<<(basic_ostream<_CharT,_Traits>& __os, _Setprecision __f)
+    { 
+      __os.precision(__f._M_n); 
+      return __os; 
+    }
+
+
+  struct _Setw { int _M_n; };
+
+  inline _Setw 
+  setw(int __n)
+  { 
+    _Setw __x; 
+    __x._M_n = __n; 
+    return __x; 
+  }
+
+  template <class _CharT, class _Traits>
+    basic_istream<_CharT,_Traits>& 
+    operator>>(basic_istream<_CharT,_Traits>& __is, _Setw __f)
+    { 
+      __is.width(__f._M_n); 
+      return __is; 
+    }
+
+  template <class _CharT, class _Traits>
+    basic_ostream<_CharT,_Traits>& 
+    operator<<(basic_ostream<_CharT,_Traits>& __os, _Setw __f)
+    { 
+      __os.width(__f._M_n); 
+      return __os; 
+    }
+} // namespace std
+
+#endif 
diff --git a/libstdc++-v3/include/std/std_ios.h b/libstdc++-v3/include/std/std_ios.h
new file mode 100644 (file)
index 0000000..1e61c36
--- /dev/null
@@ -0,0 +1,54 @@
+// Iostreams base classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.4  Iostreams base classes
+//
+
+/** @file std_ios.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_IOS
+#define _CPP_IOS       1
+
+#pragma GCC system_header
+
+#include <iosfwd>
+#include <exception>           // For ios_base::failure
+#include <bits/char_traits.h>  // For char_traits, streamoff, streamsize, fpos
+#include <cstdio>      // For SEEK_SET, SEEK_CUR, SEEK_END
+#include <bits/localefwd.h>    // For class locale
+#include <bits/ios_base.h>     // For ios_base declarations.
+#include <streambuf> 
+#include <bits/basic_ios.h>
+
+#endif /* _CPP_IOS */
+
diff --git a/libstdc++-v3/include/std/std_iosfwd.h b/libstdc++-v3/include/std/std_iosfwd.h
new file mode 100644 (file)
index 0000000..93c30b3
--- /dev/null
@@ -0,0 +1,136 @@
+// Forwarding declarations -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.2  Forward declarations
+//
+
+/** @file std_iosfwd.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_IOSFWD
+#define _CPP_IOSFWD 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/stringfwd.h> // For string forward declarations.
+#include <bits/fpos.h>
+#include <bits/functexcept.h>
+
+namespace std 
+{
+  template<typename _CharT, typename _Traits = char_traits<_CharT> >
+    class basic_ios;
+
+  template<typename _CharT, typename _Traits = char_traits<_CharT> >
+    class basic_streambuf;
+
+  template<typename _CharT, typename _Traits = char_traits<_CharT> >
+    class basic_istream;
+
+  template<typename _CharT, typename _Traits = char_traits<_CharT> >
+    class basic_ostream;
+
+  template<typename _CharT, typename _Traits = char_traits<_CharT> >
+    class basic_iostream;
+
+  template<typename _CharT, typename _Traits = char_traits<_CharT>,
+           typename _Alloc = allocator<_CharT> >
+    class basic_stringbuf;
+
+  template<typename _CharT, typename _Traits = char_traits<_CharT>,
+          typename _Alloc = allocator<_CharT> >
+    class basic_istringstream;
+
+  template<typename _CharT, typename _Traits = char_traits<_CharT>,
+          typename _Alloc = allocator<_CharT> >
+    class basic_ostringstream;
+
+  template<typename _CharT, typename _Traits = char_traits<_CharT>,
+          typename _Alloc = allocator<_CharT> >
+    class basic_stringstream;
+
+  template<typename _CharT, typename _Traits = char_traits<_CharT> >
+    class basic_filebuf;
+
+  template<typename _CharT, typename _Traits = char_traits<_CharT> >
+    class basic_ifstream;
+
+  template<typename _CharT, typename _Traits = char_traits<_CharT> >
+    class basic_ofstream;
+
+  template<typename _CharT, typename _Traits = char_traits<_CharT> >
+    class basic_fstream;
+
+  template<typename _CharT, typename _Traits = char_traits<_CharT> >
+    class istreambuf_iterator;
+
+  template<typename _CharT, typename _Traits = char_traits<_CharT> >
+    class ostreambuf_iterator;
+
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+  // Not included.   (??? Apparently no LWG number?)
+  class ios_base; 
+#endif
+
+  typedef basic_ios<char>              ios;
+  typedef basic_streambuf<char>        streambuf;
+  typedef basic_istream<char>          istream;
+  typedef basic_ostream<char>          ostream;
+  typedef basic_iostream<char>                 iostream;
+  typedef basic_stringbuf<char>        stringbuf;
+  typedef basic_istringstream<char>    istringstream;
+  typedef basic_ostringstream<char>    ostringstream;
+  typedef basic_stringstream<char>     stringstream;
+  typedef basic_filebuf<char>          filebuf;
+  typedef basic_ifstream<char>                 ifstream;
+  typedef basic_ofstream<char>                 ofstream;
+  typedef basic_fstream<char>          fstream;
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  typedef basic_ios<wchar_t>           wios;
+  typedef basic_streambuf<wchar_t>     wstreambuf;
+  typedef basic_istream<wchar_t>       wistream;
+  typedef basic_ostream<wchar_t>       wostream;
+  typedef basic_iostream<wchar_t>      wiostream;
+  typedef basic_stringbuf<wchar_t>     wstringbuf;
+  typedef basic_istringstream<wchar_t>         wistringstream;
+  typedef basic_ostringstream<wchar_t>         wostringstream;
+  typedef basic_stringstream<wchar_t>  wstringstream;
+  typedef basic_filebuf<wchar_t>       wfilebuf;
+  typedef basic_ifstream<wchar_t>      wifstream;
+  typedef basic_ofstream<wchar_t>      wofstream;
+  typedef basic_fstream<wchar_t>       wfstream;
+#endif
+} // namespace std
+
+#endif
diff --git a/libstdc++-v3/include/std/std_iostream.h b/libstdc++-v3/include/std/std_iostream.h
new file mode 100644 (file)
index 0000000..47b8379
--- /dev/null
@@ -0,0 +1,65 @@
+// Standard iostream objects -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.3  Standard iostream objects
+//
+
+/** @file std_iostream.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_IOSTREAM
+#define _CPP_IOSTREAM  1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <ostream>
+#include <istream>
+
+namespace std 
+{
+  extern istream cin;
+  extern ostream cout;
+  extern ostream cerr;
+  extern ostream clog;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  extern wistream wcin;
+  extern wostream wcout;
+  extern wostream wcerr;
+  extern wostream wclog;
+#endif
+
+  // For construction of filebuffers for cout, cin, cerr, clog et. al.
+  static ios_base::Init __ioinit;
+} // namespace std
+
+#endif
diff --git a/libstdc++-v3/include/std/std_istream.h b/libstdc++-v3/include/std/std_istream.h
new file mode 100644 (file)
index 0000000..7b51852
--- /dev/null
@@ -0,0 +1,299 @@
+// Input streams -*- C++ -*-
+
+// Copyright (C) 1997-1999, 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.6.1  Input streams
+//
+
+/** @file std_istream.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_ISTREAM
+#define _CPP_ISTREAM   1
+
+#pragma GCC system_header
+
+#include <ios>
+#include <limits> // For numeric_limits
+
+namespace std
+{
+  // 27.6.1.1 Template class basic_istream
+  template<typename _CharT, typename _Traits>
+    class basic_istream : virtual public basic_ios<_CharT, _Traits>
+    {
+    public:
+      // Types (inherited from basic_ios (27.4.4)):
+      typedef _CharT                                   char_type;
+      typedef typename _Traits::int_type               int_type;
+      typedef typename _Traits::pos_type               pos_type;
+      typedef typename _Traits::off_type               off_type;
+      typedef _Traits                                  traits_type;
+      
+      // Non-standard Types:
+      typedef basic_streambuf<_CharT, _Traits>                 __streambuf_type;
+      typedef basic_ios<_CharT, _Traits>               __ios_type;
+      typedef basic_istream<_CharT, _Traits>           __istream_type;
+      typedef istreambuf_iterator<_CharT, _Traits>     __istreambuf_iter;
+      typedef num_get<_CharT, __istreambuf_iter>        __numget_type;
+      typedef ctype<_CharT>                            __ctype_type;
+
+    protected:
+      // Data Members:
+      streamsize               _M_gcount;
+
+    public:
+      // 27.6.1.1.1 Constructor/destructor:
+      explicit 
+      basic_istream(__streambuf_type* __sb)
+      { 
+       this->init(__sb);
+       _M_gcount = streamsize(0);
+      }
+
+      virtual 
+      ~basic_istream() 
+      { _M_gcount = streamsize(0); }
+
+      // 27.6.1.1.2 Prefix/suffix:
+      class sentry;
+      friend class sentry;
+
+      // 27.6.1.2 Formatted input:
+      // 27.6.1.2.3 basic_istream::operator>>
+      __istream_type&
+      operator>>(__istream_type& (*__pf)(__istream_type&));
+
+      __istream_type&
+      operator>>(__ios_type& (*__pf)(__ios_type&));
+
+      __istream_type&
+      operator>>(ios_base& (*__pf)(ios_base&));
+      
+      // 27.6.1.2.2 Arithmetic Extractors
+      __istream_type& 
+      operator>>(bool& __n);
+      
+      __istream_type& 
+      operator>>(short& __n);
+      
+      __istream_type& 
+      operator>>(unsigned short& __n);
+
+      __istream_type& 
+      operator>>(int& __n);
+      
+      __istream_type& 
+      operator>>(unsigned int& __n);
+
+      __istream_type& 
+      operator>>(long& __n);
+      
+      __istream_type& 
+      operator>>(unsigned long& __n);
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+      __istream_type& 
+      operator>>(long long& __n);
+
+      __istream_type& 
+      operator>>(unsigned long long& __n);
+#endif
+
+      __istream_type& 
+      operator>>(float& __f);
+
+      __istream_type& 
+      operator>>(double& __f);
+
+      __istream_type& 
+      operator>>(long double& __f);
+
+      __istream_type& 
+      operator>>(void*& __p);
+
+      __istream_type& 
+      operator>>(__streambuf_type* __sb);
+      
+      // 27.6.1.3 Unformatted input:
+      inline streamsize 
+      gcount(void) const 
+      { return _M_gcount; }
+      
+      int_type 
+      get(void);
+
+      __istream_type& 
+      get(char_type& __c);
+
+      __istream_type& 
+      get(char_type* __s, streamsize __n, char_type __delim);
+
+      inline __istream_type& 
+      get(char_type* __s, streamsize __n)
+      { return this->get(__s, __n, this->widen('\n')); }
+
+      __istream_type&
+      get(__streambuf_type& __sb, char_type __delim);
+
+      inline __istream_type&
+      get(__streambuf_type& __sb)
+      { return this->get(__sb, this->widen('\n')); }
+
+      __istream_type& 
+      getline(char_type* __s, streamsize __n, char_type __delim);
+
+      inline __istream_type& 
+      getline(char_type* __s, streamsize __n)
+      { return this->getline(__s, __n, this->widen('\n')); }
+
+      __istream_type& 
+      ignore(streamsize __n = 1, int_type __delim = traits_type::eof());
+      
+      int_type 
+      peek(void);
+      
+      __istream_type& 
+      read(char_type* __s, streamsize __n);
+
+      streamsize 
+      readsome(char_type* __s, streamsize __n);
+      
+      __istream_type& 
+      putback(char_type __c);
+
+      __istream_type& 
+      unget(void);
+
+      int 
+      sync(void);
+
+      pos_type 
+      tellg(void);
+
+      __istream_type& 
+      seekg(pos_type);
+
+      __istream_type& 
+      seekg(off_type, ios_base::seekdir);
+
+    private:
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+      // Not defined.  (Side effect of DR 50.)
+      __istream_type& 
+      operator=(const __istream_type&);
+
+      basic_istream(const __istream_type&);
+#endif
+    };
+  
+  template<typename _CharT, typename _Traits>
+    class basic_istream<_CharT, _Traits>::sentry
+    {
+    public:
+      typedef _Traits                                  traits_type;
+      typedef basic_streambuf<_CharT, _Traits>                 __streambuf_type;
+      typedef basic_istream<_CharT, _Traits>           __istream_type;
+      typedef typename __istream_type::__ctype_type    __ctype_type;
+      typedef typename _Traits::int_type               __int_type;
+
+      explicit 
+      sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false);
+
+      operator bool() { return _M_ok; }
+
+    private:
+      bool _M_ok;
+    };
+
+  // 27.6.1.2.3 Character extraction templates
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c);
+
+  template<class _Traits>
+    basic_istream<char, _Traits>&
+    operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
+    { return (__in >> reinterpret_cast<char&>(__c)); }
+
+  template<class _Traits>
+    basic_istream<char, _Traits>&
+    operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
+    { return (__in >> reinterpret_cast<char&>(__c)); }
+
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>&
+    operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s);
+  
+  template<class _Traits>
+    basic_istream<char,_Traits>&
+    operator>>(basic_istream<char,_Traits>& __in, unsigned char* __s)
+    { return (__in >> reinterpret_cast<char*>(__s)); }
+
+  template<class _Traits>
+    basic_istream<char,_Traits>&
+    operator>>(basic_istream<char,_Traits>& __in, signed char* __s)
+    { return (__in >> reinterpret_cast<char*>(__s)); }
+
+  // 27.6.1.5 Template class basic_iostream
+  template<typename _CharT, typename _Traits>
+    class basic_iostream
+    : public basic_istream<_CharT, _Traits>,
+      public basic_ostream<_CharT, _Traits>
+    {
+    public:
+      // Non-standard Types:
+      typedef basic_istream<_CharT, _Traits>           __istream_type;
+      typedef basic_ostream<_CharT, _Traits>           __ostream_type;
+
+      explicit 
+      basic_iostream(basic_streambuf<_CharT, _Traits>* __sb)
+      : __istream_type(__sb), __ostream_type(__sb)
+      { }
+
+      virtual 
+      ~basic_iostream() { }
+    };
+
+  // 27.6.1.4 Standard basic_istream manipulators
+  template<typename _CharT, typename _Traits>
+    basic_istream<_CharT, _Traits>& 
+    ws(basic_istream<_CharT, _Traits>& __is);
+} // namespace std
+
+#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
+# define export
+#ifdef  _GLIBCPP_FULLY_COMPLIANT_HEADERS
+# include <bits/istream.tcc>
+#endif
+#endif
+
+#endif /* _CPP_ISTREAM */
diff --git a/libstdc++-v3/include/std/std_iterator.h b/libstdc++-v3/include/std/std_iterator.h
new file mode 100644 (file)
index 0000000..f0eee11
--- /dev/null
@@ -0,0 +1,79 @@
+// <iterator> -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file std_iterator.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_ITERATOR
+#define _CPP_ITERATOR 1
+
+#pragma GCC system_header
+#include <bits/c++config.h>
+#include <cstddef>
+#include <bits/stl_iterator_base_types.h>
+#include <bits/stl_iterator_base_funcs.h>
+#include <bits/stl_iterator.h>
+#include <ostream>
+#include <istream>
+#include <bits/stream_iterator.h>
+#include <bits/streambuf_iterator.h>
+
+#endif /* _CPP_ITERATOR */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/libstdc++-v3/include/std/std_limits.h b/libstdc++-v3/include/std/std_limits.h
new file mode 100644 (file)
index 0000000..7a64636
--- /dev/null
@@ -0,0 +1,2017 @@
+// The template and inlines for the -*- C++ -*- numeric_limits classes.
+
+// Copyright (C) 1999-2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// Note: this is not a conforming implementation.
+// Written by Gabriel Dos Reis <gdr@codesourcery.com>
+
+//
+// ISO 14882:1998
+// 18.2.1
+//
+
+/** @file std_limits.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_NUMERIC_LIMITS
+#define _CPP_NUMERIC_LIMITS 1
+
+#pragma GCC system_header
+
+#include <bits/cpu_limits.h>
+#include <bits/c++config.h>
+
+//
+// The numeric_limits<> traits document implementation-defined aspects
+// of fundamental arithmetic data types (integers and floating points).
+// From Standard C++ point of view, there are 13 such types:
+//   * integers
+//         bool                                                        (1)
+//         char, signed char, unsigned char                    (3)
+//         short, unsigned short                               (2)
+//         int, unsigned                                       (2)
+//         long, unsigned long                                 (2)
+//
+//   * floating points
+//         float                                               (1)
+//         double                                              (1)
+//         long double                                         (1)
+//
+// GNU C++ undertstands (where supported by the host C-library) 
+//   * integer
+//         long long, unsigned long long                       (2)
+//
+// which brings us to 15 fundamental arithmetic data types in GNU C++.
+//
+// 
+// Since a numeric_limits<> is a bit tricky to get right, we rely on
+// an interface composed of macros which should be defined in config/os
+// or config/cpu when they differ from the generic (read arbitrary)
+// definitions given here.
+//
+
+// These values can be overridden in the target configuration file.
+// The default values are appropriate for many 32-bit targets.
+
+#ifndef __glibcpp_char_bits
+#define __glibcpp_char_bits 8
+#endif
+#ifdef __CHAR_UNSIGNED__
+#define __glibcpp_plain_char_is_signed false
+#else
+#define __glibcpp_plain_char_is_signed true
+#endif
+#ifndef __glibcpp_short_bits
+#define __glibcpp_short_bits 16
+#endif
+#ifndef __glibcpp_int_bits
+#define __glibcpp_int_bits 32
+#endif
+#ifndef __glibcpp_long_bits
+#define __glibcpp_long_bits 32
+#endif
+#ifndef __glibcpp_wchar_t_bits
+#define __glibcpp_wchar_t_bits 32
+#endif
+#ifndef __glibcpp_wchar_t_is_signed
+#define __glibcpp_wchar_t_is_signed true
+#endif
+#ifndef __glibcpp_long_long_bits
+#define __glibcpp_long_long_bits 64
+#endif
+#ifndef __glibcpp_float_bits
+#define __glibcpp_float_bits 32
+#endif
+#ifndef __glibcpp_double_bits
+#define __glibcpp_double_bits 64
+#endif
+#ifndef __glibcpp_long_double_bits
+#define __glibcpp_long_double_bits 128
+#endif
+
+#ifndef __glibcpp_char_traps
+#define __glibcpp_char_traps true
+#endif
+#ifndef __glibcpp_short_traps
+#define __glibcpp_short_traps true
+#endif
+#ifndef __glibcpp_int_traps
+#define __glibcpp_int_traps true
+#endif
+#ifndef __glibcpp_long_traps
+#define __glibcpp_long_traps true
+#endif
+#ifndef __glibcpp_wchar_t_traps
+#define __glibcpp_wchar_t_traps true
+#endif
+#ifndef __glibcpp_long_long_traps
+#define __glibcpp_long_long_traps true
+#endif
+
+// You should not need to define any macros below this point, unless
+// you have a machine with non-standard bit-widths.
+
+// These values are the minimums and maximums for standard data types
+// of common widths.
+
+#define __glibcpp_s8_max 127
+#define __glibcpp_s8_min (-__glibcpp_s8_max - 1)
+#define __glibcpp_s8_digits 7
+#define __glibcpp_s8_digits10 2
+#define __glibcpp_u8_min 0U
+#define __glibcpp_u8_max (__glibcpp_s8_max * 2 + 1)
+#define __glibcpp_u8_digits 8
+#define __glibcpp_u8_digits10 2
+#define __glibcpp_s16_max 32767
+#define __glibcpp_s16_min (-__glibcpp_s16_max - 1)
+#define __glibcpp_s16_digits 15
+#define __glibcpp_s16_digits10 4
+#define __glibcpp_u16_min 0U
+#define __glibcpp_u16_max (__glibcpp_s16_max * 2 + 1)
+#define __glibcpp_u16_digits 16
+#define __glibcpp_u16_digits10 4
+#define __glibcpp_s32_max 2147483647L
+#define __glibcpp_s32_min (-__glibcpp_s32_max - 1)
+#define __glibcpp_s32_digits 31
+#define __glibcpp_s32_digits10 9
+#define __glibcpp_u32_min 0UL
+#define __glibcpp_u32_max (__glibcpp_s32_max * 2U + 1)
+#define __glibcpp_u32_digits 32
+#define __glibcpp_u32_digits10 9
+#define __glibcpp_s64_max 9223372036854775807LL
+#define __glibcpp_s64_min (-__glibcpp_s64_max - 1)
+#define __glibcpp_s64_digits 63
+#define __glibcpp_s64_digits10 18
+#define __glibcpp_u64_min 0ULL
+#define __glibcpp_u64_max (__glibcpp_s64_max * 2ULL + 1)
+#define __glibcpp_u64_digits 64
+#define __glibcpp_u64_digits10 19
+
+#define __glibcpp_f32_min 1.17549435e-38F
+#define __glibcpp_f32_max 3.40282347e+38F
+#define __glibcpp_f32_digits 24
+#define __glibcpp_f32_digits10 6
+#define __glibcpp_f32_radix 2
+#define __glibcpp_f32_epsilon 1.19209290e-07F
+#define __glibcpp_f32_round_error 1.0F
+#define __glibcpp_f32_min_exponent -125
+#define __glibcpp_f32_min_exponent10 -37
+#define __glibcpp_f32_max_exponent 128
+#define __glibcpp_f32_max_exponent10 38
+#define __glibcpp_f64_min 2.2250738585072014e-308
+#define __glibcpp_f64_max 1.7976931348623157e+308
+#define __glibcpp_f64_digits 53
+#define __glibcpp_f64_digits10 15
+#define __glibcpp_f64_radix 2
+#define __glibcpp_f64_epsilon 2.2204460492503131e-16
+#define __glibcpp_f64_round_error 1.0
+#define __glibcpp_f64_min_exponent -1021
+#define __glibcpp_f64_min_exponent10 -307
+#define __glibcpp_f64_max_exponent 1024
+#define __glibcpp_f64_max_exponent10 308
+#define __glibcpp_f80_min 3.36210314311209350626e-4932L
+#define __glibcpp_f80_max 1.18973149535723176502e+4932L
+#define __glibcpp_f80_digits 64
+#define __glibcpp_f80_digits10 18
+#define __glibcpp_f80_radix 2
+#define __glibcpp_f80_epsilon 1.08420217248550443401e-19L
+#define __glibcpp_f80_round_error 1.0L
+#define __glibcpp_f80_min_exponent -16381
+#define __glibcpp_f80_min_exponent10 -4931
+#define __glibcpp_f80_max_exponent 16384
+#define __glibcpp_f80_max_exponent10 4932
+#define __glibcpp_f96_min 1.68105157155604675313e-4932L
+#define __glibcpp_f96_max 1.18973149535723176502e+4932L
+#define __glibcpp_f96_digits 64
+#define __glibcpp_f96_digits10 18
+#define __glibcpp_f96_radix 2
+#define __glibcpp_f96_epsilon 1.08420217248550443401e-19L
+#define __glibcpp_f96_round_error 1.0L
+#define __glibcpp_f96_min_exponent -16382
+#define __glibcpp_f96_min_exponent10 -4931
+#define __glibcpp_f96_max_exponent 16384
+#define __glibcpp_f96_max_exponent10 4932
+#define __glibcpp_f128_min 3.362103143112093506262677817321752603E-4932L
+#define __glibcpp_f128_max 1.189731495357231765085759326628007016E+4932L
+#define __glibcpp_f128_digits 113
+#define __glibcpp_f128_digits10 33
+#define __glibcpp_f128_radix 2
+#define __glibcpp_f128_epsilon 1.925929944387235853055977942584927319E-34L
+#define __glibcpp_f128_round_error 1.0L
+#define __glibcpp_f128_min_exponent -16381
+#define __glibcpp_f128_min_exponent10 -4931
+#define __glibcpp_f128_max_exponent 16384
+#define __glibcpp_f128_max_exponent10 4932
+
+// bool-specific hooks:
+//     __glibcpp_bool_digits  __glibcpp_int_traps __glibcpp_long_traps
+
+// This is actually CHAR_BITS because the new ABI says a bool
+// is one (1) byte wide.
+
+#ifndef __glibcpp_bool_digits
+#define __glibcpp_bool_digits __glibcpp_char_bits
+#endif
+
+// char.
+
+#define __glibcpp_plain_char_traps true
+#define __glibcpp_signed_char_traps true
+#define __glibcpp_unsigned_char_traps true
+#ifndef __glibcpp_char_is_modulo
+#define __glibcpp_char_is_modulo true
+#endif
+#ifndef __glibcpp_signed_char_is_modulo
+#define __glibcpp_signed_char_is_modulo true
+#endif
+#if __glibcpp_char_bits == 8
+#define __glibcpp_signed_char_min __glibcpp_s8_min
+#define __glibcpp_signed_char_max __glibcpp_s8_max
+#define __glibcpp_signed_char_digits __glibcpp_s8_digits
+#define __glibcpp_signed_char_digits10 __glibcpp_s8_digits10
+#define __glibcpp_unsigned_char_min __glibcpp_u8_min
+#define __glibcpp_unsigned_char_max __glibcpp_u8_max
+#define __glibcpp_unsigned_char_digits __glibcpp_u8_digits
+#define __glibcpp_unsigned_char_digits10 __glibcpp_u8_digits10
+#elif __glibcpp_char_bits == 16
+#define __glibcpp_signed_char_min __glibcpp_s16_min
+#define __glibcpp_signed_char_max __glibcpp_s16_max
+#define __glibcpp_signed_char_digits __glibcpp_s16_digits
+#define __glibcpp_signed_char_digits10 __glibcpp_s16_digits10
+#define __glibcpp_unsigned_char_min __glibcpp_u16_min
+#define __glibcpp_unsigned_char_max __glibcpp_u16_max
+#define __glibcpp_unsigned_char_digits __glibcpp_u16_digits
+#define __glibcpp_unsigned_char_digits10 __glibcpp_u16_digits10
+#elif __glibcpp_char_bits == 32
+#define __glibcpp_signed_char_min (signed char)__glibcpp_s32_min
+#define __glibcpp_signed_char_max (signed char)__glibcpp_s32_max
+#define __glibcpp_signed_char_digits __glibcpp_s32_digits
+#define __glibcpp_signed_char_digits10 __glibcpp_s32_digits10
+#define __glibcpp_unsigned_char_min (unsigned char)__glibcpp_u32_min
+#define __glibcpp_unsigned_char_max (unsigned char)__glibcpp_u32_max
+#define __glibcpp_unsigned_char_digits __glibcpp_u32_digits
+#define __glibcpp_unsigned_char_digits10 __glibcpp_u32_digits10
+#elif __glibcpp_char_bits == 64
+#define __glibcpp_signed_char_min (signed char)__glibcpp_s64_min
+#define __glibcpp_signed_char_max (signed char)__glibcpp_s64_max
+#define __glibcpp_signed_char_digits __glibcpp_s64_digits
+#define __glibcpp_signed_char_digits10 __glibcpp_s64_digits10
+#define __glibcpp_unsigned_char_min (unsigned char)__glibcpp_u64_min
+#define __glibcpp_unsigned_char_max (unsigned char)__glibcpp_u64_max
+#define __glibcpp_unsigned_char_digits __glibcpp_u64_digits
+#define __glibcpp_unsigned_char_digits10 __glibcpp_u64_digits10
+#else
+// You must define these macros in the configuration file.
+#endif
+
+#if __glibcpp_plain_char_is_signed
+#define __glibcpp_char_min (char)__glibcpp_signed_char_min
+#define __glibcpp_char_max (char)__glibcpp_signed_char_max
+#define __glibcpp_char_digits __glibcpp_signed_char_digits
+#define __glibcpp_char_digits10 __glibcpp_signed_char_digits
+#else
+#define __glibcpp_char_min (char)__glibcpp_unsigned_char_min
+#define __glibcpp_char_max (char)__glibcpp_unsigned_char_max
+#define __glibcpp_char_digits __glibcpp_unsigned_char_digits
+#define __glibcpp_char_digits10 __glibcpp_unsigned_char_digits
+#endif
+
+// short
+
+#define __glibcpp_signed_short_traps true
+#define __glibcpp_unsigned_short_traps true
+#ifndef __glibcpp_signed_short_is_modulo
+#define __glibcpp_signed_short_is_modulo true
+#endif
+#if __glibcpp_short_bits == 8
+#define __glibcpp_signed_short_min __glibcpp_s8_min
+#define __glibcpp_signed_short_max __glibcpp_s8_max
+#define __glibcpp_signed_short_digits __glibcpp_s8_digits
+#define __glibcpp_signed_short_digits10 __glibcpp_s8_digits10
+#define __glibcpp_unsigned_short_min __glibcpp_u8_min
+#define __glibcpp_unsigned_short_max __glibcpp_u8_max
+#define __glibcpp_unsigned_short_digits __glibcpp_u8_digits
+#define __glibcpp_unsigned_short_digits10 __glibcpp_u8_digits10
+#elif __glibcpp_short_bits == 16
+#define __glibcpp_signed_short_min __glibcpp_s16_min
+#define __glibcpp_signed_short_max __glibcpp_s16_max
+#define __glibcpp_signed_short_digits __glibcpp_s16_digits
+#define __glibcpp_signed_short_digits10 __glibcpp_s16_digits10
+#define __glibcpp_unsigned_short_min __glibcpp_u16_min
+#define __glibcpp_unsigned_short_max __glibcpp_u16_max
+#define __glibcpp_unsigned_short_digits __glibcpp_u16_digits
+#define __glibcpp_unsigned_short_digits10 __glibcpp_u16_digits10
+#elif __glibcpp_short_bits == 32
+#define __glibcpp_signed_short_min (short)__glibcpp_s32_min
+#define __glibcpp_signed_short_max (short)__glibcpp_s32_max
+#define __glibcpp_signed_short_digits __glibcpp_s32_digits
+#define __glibcpp_signed_short_digits10 __glibcpp_s32_digits10
+#define __glibcpp_unsigned_short_min (unsigned short)__glibcpp_u32_min
+#define __glibcpp_unsigned_short_max (unsigned short)__glibcpp_u32_max
+#define __glibcpp_unsigned_short_digits __glibcpp_u32_digits
+#define __glibcpp_unsigned_short_digits10 __glibcpp_u32_digits10
+#elif __glibcpp_short_bits == 64
+#define __glibcpp_signed_short_min (short)__glibcpp_s64_min
+#define __glibcpp_signed_short_max (short)__glibcpp_s64_max
+#define __glibcpp_signed_short_digits __glibcpp_s64_digits
+#define __glibcpp_signed_short_digits10 __glibcpp_s64_digits10
+#define __glibcpp_unsigned_short_min (unsigned short)__glibcpp_u64_min
+#define __glibcpp_unsigned_short_max (unsigned short)__glibcpp_u64_max
+#define __glibcpp_unsigned_short_digits __glibcpp_u64_digits
+#define __glibcpp_unsigned_short_digits10 __glibcpp_u64_digits10
+#else
+// You must define these macros in the configuration file.
+#endif
+
+// int
+
+#define __glibcpp_signed_int_traps true
+#define __glibcpp_unsigned_int_traps true
+#ifndef __glibcpp_signed_int_is_modulo
+#define __glibcpp_signed_int_is_modulo true
+#endif
+#if __glibcpp_int_bits == 8
+#define __glibcpp_signed_int_min __glibcpp_s8_min
+#define __glibcpp_signed_int_max __glibcpp_s8_max
+#define __glibcpp_signed_int_digits __glibcpp_s8_digits
+#define __glibcpp_signed_int_digits10 __glibcpp_s8_digits10
+#define __glibcpp_unsigned_int_min __glibcpp_u8_min
+#define __glibcpp_unsigned_int_max __glibcpp_u8_max
+#define __glibcpp_unsigned_int_digits __glibcpp_u8_digits
+#define __glibcpp_unsigned_int_digits10 __glibcpp_u8_digits10
+#elif __glibcpp_int_bits == 16
+#define __glibcpp_signed_int_min __glibcpp_s16_min
+#define __glibcpp_signed_int_max __glibcpp_s16_max
+#define __glibcpp_signed_int_digits __glibcpp_s16_digits
+#define __glibcpp_signed_int_digits10 __glibcpp_s16_digits10
+#define __glibcpp_unsigned_int_min __glibcpp_u16_min
+#define __glibcpp_unsigned_int_max __glibcpp_u16_max
+#define __glibcpp_unsigned_int_digits __glibcpp_u16_digits
+#define __glibcpp_unsigned_int_digits10 __glibcpp_u16_digits10
+#elif __glibcpp_int_bits == 32
+#define __glibcpp_signed_int_min (int)__glibcpp_s32_min
+#define __glibcpp_signed_int_max (int)__glibcpp_s32_max
+#define __glibcpp_signed_int_digits __glibcpp_s32_digits
+#define __glibcpp_signed_int_digits10 __glibcpp_s32_digits10
+#define __glibcpp_unsigned_int_min (unsigned)__glibcpp_u32_min
+#define __glibcpp_unsigned_int_max (unsigned)__glibcpp_u32_max
+#define __glibcpp_unsigned_int_digits __glibcpp_u32_digits
+#define __glibcpp_unsigned_int_digits10 __glibcpp_u32_digits10
+#elif __glibcpp_int_bits == 64
+#define __glibcpp_signed_int_min (int)__glibcpp_s64_min
+#define __glibcpp_signed_int_max (int)__glibcpp_s64_max
+#define __glibcpp_signed_int_digits __glibcpp_s64_digits
+#define __glibcpp_signed_int_digits10 __glibcpp_s64_digits10
+#define __glibcpp_unsigned_int_min (unsigned)__glibcpp_u64_min
+#define __glibcpp_unsigned_int_max (unsigned)__glibcpp_u64_max
+#define __glibcpp_unsigned_int_digits __glibcpp_u64_digits
+#define __glibcpp_unsigned_int_digits10 __glibcpp_u64_digits10
+#else
+// You must define these macros in the configuration file.
+#endif
+
+// long
+
+#define __glibcpp_signed_long_traps true
+#define __glibcpp_unsigned_long_traps true
+#ifndef __glibcpp_signed_long_is_modulo
+#define __glibcpp_signed_long_is_modulo true
+#endif
+#if __glibcpp_long_bits == 8
+#define __glibcpp_signed_long_min __glibcpp_s8_min
+#define __glibcpp_signed_long_max __glibcpp_s8_max
+#define __glibcpp_signed_long_digits __glibcpp_s8_digits
+#define __glibcpp_signed_long_digits10 __glibcpp_s8_digits10
+#define __glibcpp_unsigned_long_min __glibcpp_u8_min
+#define __glibcpp_unsigned_long_max __glibcpp_u8_max
+#define __glibcpp_unsigned_long_digits __glibcpp_u8_digits
+#define __glibcpp_unsigned_long_digits10 __glibcpp_u8_digits10
+#elif __glibcpp_long_bits == 16
+#define __glibcpp_signed_long_min __glibcpp_s16_min
+#define __glibcpp_signed_long_max __glibcpp_s16_max
+#define __glibcpp_signed_long_digits __glibcpp_s16_digits
+#define __glibcpp_signed_long_digits10 __glibcpp_s16_digits10
+#define __glibcpp_unsigned_long_min __glibcpp_u16_min
+#define __glibcpp_unsigned_long_max __glibcpp_u16_max
+#define __glibcpp_unsigned_long_digits __glibcpp_u16_digits
+#define __glibcpp_unsigned_long_digits10 __glibcpp_u16_digits10
+#elif __glibcpp_long_bits == 32
+#define __glibcpp_signed_long_min __glibcpp_s32_min
+#define __glibcpp_signed_long_max __glibcpp_s32_max
+#define __glibcpp_signed_long_digits __glibcpp_s32_digits
+#define __glibcpp_signed_long_digits10 __glibcpp_s32_digits10
+#define __glibcpp_unsigned_long_min __glibcpp_u32_min
+#define __glibcpp_unsigned_long_max __glibcpp_u32_max
+#define __glibcpp_unsigned_long_digits __glibcpp_u32_digits
+#define __glibcpp_unsigned_long_digits10 __glibcpp_u32_digits10
+#elif __glibcpp_long_bits == 64
+#define __glibcpp_signed_long_min (long)__glibcpp_s64_min
+#define __glibcpp_signed_long_max (long)__glibcpp_s64_max
+#define __glibcpp_signed_long_digits __glibcpp_s64_digits
+#define __glibcpp_signed_long_digits10 __glibcpp_s64_digits10
+#define __glibcpp_unsigned_long_min (unsigned long)__glibcpp_u64_min
+#define __glibcpp_unsigned_long_max (unsigned long)__glibcpp_u64_max
+#define __glibcpp_unsigned_long_digits __glibcpp_u64_digits
+#define __glibcpp_unsigned_long_digits10 __glibcpp_u64_digits10
+#else
+// You must define these macros in the configuration file.
+#endif
+
+// long long
+
+#define __glibcpp_signed_long_long_traps true
+#define __glibcpp_signed_long_long_traps true
+#ifndef __glibcpp_signed_long_long_is_modulo
+#define __glibcpp_signed_long_long_is_modulo true
+#endif
+#if __glibcpp_long_long_bits == 8
+#define __glibcpp_signed_long_long_min __glibcpp_s8_min
+#define __glibcpp_signed_long_long_max __glibcpp_s8_max
+#define __glibcpp_signed_long_long_digits __glibcpp_s8_digits
+#define __glibcpp_signed_long_long_digits10 __glibcpp_s8_digits10
+#define __glibcpp_unsigned_long_long_min __glibcpp_u8_min
+#define __glibcpp_unsigned_long_long_max __glibcpp_u8_max
+#define __glibcpp_unsigned_long_long_digits __glibcpp_u8_digits
+#define __glibcpp_unsigned_long_long_digits10 __glibcpp_u8_digits10
+#elif __glibcpp_long_long_bits == 16
+#define __glibcpp_signed_long_long_min __glibcpp_s16_min
+#define __glibcpp_signed_long_long_max __glibcpp_s16_max
+#define __glibcpp_signed_long_long_digits __glibcpp_s16_digits
+#define __glibcpp_signed_long_long_digits10 __glibcpp_s16_digits10
+#define __glibcpp_unsigned_long_long_min __glibcpp_u16_min
+#define __glibcpp_unsigned_long_long_max __glibcpp_u16_max
+#define __glibcpp_unsigned_long_long_digits __glibcpp_u16_digits
+#define __glibcpp_unsigned_long_long_digits10 __glibcpp_u16_digits10
+#elif __glibcpp_long_long_bits == 32
+#define __glibcpp_signed_long_long_min __glibcpp_s32_min
+#define __glibcpp_signed_long_long_max __glibcpp_s32_max
+#define __glibcpp_signed_long_long_digits __glibcpp_s32_digits
+#define __glibcpp_signed_long_long_digits10 __glibcpp_s32_digits10
+#define __glibcpp_unsigned_long_long_min __glibcpp_u32_min
+#define __glibcpp_unsigned_long_long_max __glibcpp_u32_max
+#define __glibcpp_unsigned_long_long_digits __glibcpp_u32_digits
+#define __glibcpp_unsigned_long_long_digits10 __glibcpp_u32_digits10
+#elif __glibcpp_long_long_bits == 64
+#define __glibcpp_signed_long_long_min __glibcpp_s64_min
+#define __glibcpp_signed_long_long_max __glibcpp_s64_max
+#define __glibcpp_signed_long_long_digits __glibcpp_s64_digits
+#define __glibcpp_signed_long_long_digits10 __glibcpp_s64_digits10
+#define __glibcpp_signed_long_long_traps true
+#define __glibcpp_unsigned_long_long_min __glibcpp_u64_min
+#define __glibcpp_unsigned_long_long_max __glibcpp_u64_max
+#define __glibcpp_unsigned_long_long_digits __glibcpp_u64_digits
+#define __glibcpp_unsigned_long_long_digits10 __glibcpp_u64_digits10
+#define __glibcpp_unsigned_long_long_traps true
+#else
+// You must define these macros in the configuration file.
+#endif
+
+// wchar_t
+
+#define __glibcpp_wchar_t_traps true
+#ifndef __glibcpp_wchar_t_is_modulo
+#define __glibcpp_wchar_t_is_modulo true
+#endif
+#if __glibcpp_wchar_t_is_signed
+#if __glibcpp_wchar_t_bits == 8
+#define __glibcpp_wchar_t_min __glibcpp_s8_min
+#define __glibcpp_wchar_t_max __glibcpp_s8_max
+#define __glibcpp_wchar_t_digits __glibcpp_s8_digits
+#define __glibcpp_wchar_t_digits10 __glibcpp_s8_digits10
+#elif __glibcpp_wchar_t_bits == 16
+#define __glibcpp_wchar_t_min __glibcpp_s16_min
+#define __glibcpp_wchar_t_max __glibcpp_s16_max
+#define __glibcpp_wchar_t_digits __glibcpp_s16_digits
+#define __glibcpp_wchar_t_digits10 __glibcpp_s16_digits10
+#elif __glibcpp_wchar_t_bits == 32
+#define __glibcpp_wchar_t_min (wchar_t)__glibcpp_s32_min
+#define __glibcpp_wchar_t_max (wchar_t)__glibcpp_s32_max
+#define __glibcpp_wchar_t_digits __glibcpp_s32_digits
+#define __glibcpp_wchar_t_digits10 __glibcpp_s32_digits10
+#elif __glibcpp_wchar_t_bits == 64
+#define __glibcpp_wchar_t_min (wchar_t)__glibcpp_s64_min
+#define __glibcpp_wchar_t_max (wchar_t)__glibcpp_s64_max
+#define __glibcpp_wchar_t_digits __glibcpp_s64_digits
+#define __glibcpp_wchar_t_digits10 __glibcpp_s64_digits10
+#else
+// You must define these macros in the configuration file.
+#endif
+#else
+#if __glibcpp_wchar_t_bits == 8
+#define __glibcpp_wchar_t_min __glibcpp_u8_min
+#define __glibcpp_wchar_t_max __glibcpp_u8_max
+#define __glibcpp_wchar_t_digits __glibcpp_u8_digits
+#define __glibcpp_wchar_t_digits10 __glibcpp_u8_digits10
+#elif __glibcpp_wchar_t_bits == 16
+#define __glibcpp_wchar_t_min __glibcpp_u16_min
+#define __glibcpp_wchar_t_max __glibcpp_u16_max
+#define __glibcpp_wchar_t_digits __glibcpp_u16_digits
+#define __glibcpp_wchar_t_digits10 __glibcpp_u16_digits10
+#elif __glibcpp_wchar_t_bits == 32
+#define __glibcpp_wchar_t_min (wchar_t)__glibcpp_u32_min
+#define __glibcpp_wchar_t_max (wchar_t)__glibcpp_u32_max
+#define __glibcpp_wchar_t_digits __glibcpp_u32_digits
+#define __glibcpp_wchar_t_digits10 __glibcpp_u32_digits10
+#elif __glibcpp_wchar_t_bits == 64
+#define __glibcpp_wchar_t_min (wchar_t)__glibcpp_u64_min
+#define __glibcpp_wchar_t_max (wchar_t)__glibcpp_u64_max
+#define __glibcpp_wchar_t_digits __glibcpp_u64_digits
+#define __glibcpp_wchar_t_digits10 __glibcpp_u64_digits10
+#else
+// You must define these macros in the configuration file.
+#endif
+#endif
+
+// float
+//
+
+#if __glibcpp_float_bits == 32
+#define __glibcpp_float_min __glibcpp_f32_min
+#define __glibcpp_float_max __glibcpp_f32_max
+#define __glibcpp_float_digits __glibcpp_f32_digits
+#define __glibcpp_float_digits10 __glibcpp_f32_digits10
+#define __glibcpp_float_radix __glibcpp_f32_radix
+#define __glibcpp_float_epsilon __glibcpp_f32_epsilon
+#define __glibcpp_float_round_error __glibcpp_f32_round_error
+#define __glibcpp_float_min_exponent __glibcpp_f32_min_exponent
+#define __glibcpp_float_min_exponent10 __glibcpp_f32_min_exponent10
+#define __glibcpp_float_max_exponent __glibcpp_f32_max_exponent
+#define __glibcpp_float_max_exponent10 __glibcpp_f32_max_exponent10
+#elif __glibcpp_float_bits == 64
+#define __glibcpp_float_min __glibcpp_f64_min
+#define __glibcpp_float_max __glibcpp_f64_max
+#define __glibcpp_float_digits __glibcpp_f64_digits
+#define __glibcpp_float_digits10 __glibcpp_f64_digits10
+#define __glibcpp_float_radix __glibcpp_f64_radix
+#define __glibcpp_float_epsilon __glibcpp_f64_epsilon
+#define __glibcpp_float_round_error __glibcpp_f64_round_error
+#define __glibcpp_float_min_exponent __glibcpp_f64_min_exponent
+#define __glibcpp_float_min_exponent10 __glibcpp_f64_min_exponent10
+#define __glibcpp_float_max_exponent __glibcpp_f64_max_exponent
+#define __glibcpp_float_max_exponent10 __glibcpp_f64_max_exponent10
+#elif __glibcpp_float_bits == 80
+#define __glibcpp_float_min __glibcpp_f80_min
+#define __glibcpp_float_max __glibcpp_f80_max
+#define __glibcpp_float_digits __glibcpp_f80_digits
+#define __glibcpp_float_digits10 __glibcpp_f80_digits10
+#define __glibcpp_float_radix __glibcpp_f80_radix
+#define __glibcpp_float_epsilon __glibcpp_f80_epsilon
+#define __glibcpp_float_round_error __glibcpp_f80_round_error
+#define __glibcpp_float_min_exponent __glibcpp_f80_min_exponent
+#define __glibcpp_float_min_exponent10 __glibcpp_f80_min_exponent10
+#define __glibcpp_float_max_exponent __glibcpp_f80_max_exponent
+#define __glibcpp_float_max_exponent10 __glibcpp_f80_max_exponent10
+#else
+// You must define these macros in the configuration file.
+#endif
+
+// FIXME: These are just stubs and inkorrect
+
+#ifndef __glibcpp_float_has_infinity
+#define __glibcpp_float_has_infinity false
+#endif
+
+#ifndef __glibcpp_float_has_quiet_NaM
+#define __glibcpp_float_has_quiet_NaN false
+#endif
+
+#ifndef __glibcpp_float_has_signaling_NaN
+#define __glibcpp_float_has_signaling_NaN false
+#endif
+
+#ifndef __glibcpp_float_has_denorm
+#define __glibcpp_float_has_denorm denorm_absent
+#endif
+
+#ifndef __glibcpp_float_has_denorm_loss
+#define __glibcpp_float_has_denorm_loss false
+#endif
+
+#ifndef __glibcpp_float_infinity
+#define __glibcpp_float_infinity 0.0F
+#endif
+
+#ifndef __glibcpp_float_quiet_NaN
+#define __glibcpp_float_quiet_NaN 0.0F
+#endif
+
+#ifndef __glibcpp_float_signaling_NaN
+#define __glibcpp_float_signaling_NaN 0.0F
+#endif
+
+#ifndef __glibcpp_float_denorm_min
+#define __glibcpp_float_denorm_min 0.0F
+#endif
+
+#ifndef __glibcpp_float_is_iec559
+#define __glibcpp_float_is_iec559 false
+#endif
+
+#ifndef __glibcpp_float_is_bounded
+#define __glibcpp_float_is_bounded true
+#endif
+
+#ifndef __glibcpp_float_is_modulo
+#define __glibcpp_float_is_modulo false
+#endif
+
+#ifndef __glibcpp_float_traps
+#define __glibcpp_float_traps false
+#endif
+
+#ifndef __glibcpp_float_tinyness_before
+#define __glibcpp_float_tinyness_before false
+#endif
+
+#ifndef __glibcpp_float_round_style
+#define __glibcpp_float_round_style round_toward_zero
+#endif
+
+// double
+
+#if __glibcpp_double_bits == 32
+#define __glibcpp_double_min __glibcpp_f32_min
+#define __glibcpp_double_max __glibcpp_f32_max
+#define __glibcpp_double_digits __glibcpp_f32_digits
+#define __glibcpp_double_digits10 __glibcpp_f32_digits10
+#define __glibcpp_double_radix __glibcpp_f32_radix
+#define __glibcpp_double_epsilon __glibcpp_f32_epsilon
+#define __glibcpp_double_round_error __glibcpp_f32_round_error
+#define __glibcpp_double_min_exponent __glibcpp_f32_min_exponent
+#define __glibcpp_double_min_exponent10 __glibcpp_f32_min_exponent10
+#define __glibcpp_double_max_exponent __glibcpp_f32_max_exponent
+#define __glibcpp_double_max_exponent10 __glibcpp_f32_max_exponent10
+#elif __glibcpp_double_bits == 64
+#define __glibcpp_double_min __glibcpp_f64_min
+#define __glibcpp_double_max __glibcpp_f64_max
+#define __glibcpp_double_digits __glibcpp_f64_digits
+#define __glibcpp_double_digits10 __glibcpp_f64_digits10
+#define __glibcpp_double_radix __glibcpp_f64_radix
+#define __glibcpp_double_epsilon __glibcpp_f64_epsilon
+#define __glibcpp_double_round_error __glibcpp_f64_round_error
+#define __glibcpp_double_min_exponent __glibcpp_f64_min_exponent
+#define __glibcpp_double_min_exponent10 __glibcpp_f64_min_exponent10
+#define __glibcpp_double_max_exponent __glibcpp_f64_max_exponent
+#define __glibcpp_double_max_exponent10 __glibcpp_f64_max_exponent10
+#elif __glibcpp_double_bits == 80
+#define __glibcpp_double_min __glibcpp_f80_min
+#define __glibcpp_double_max __glibcpp_f80_max
+#define __glibcpp_double_digits __glibcpp_f80_digits
+#define __glibcpp_double_digits10 __glibcpp_f80_digits10
+#define __glibcpp_double_radix __glibcpp_f80_radix
+#define __glibcpp_double_epsilon __glibcpp_f80_epsilon
+#define __glibcpp_double_round_error __glibcpp_f80_round_error
+#define __glibcpp_double_min_exponent __glibcpp_f80_min_exponent
+#define __glibcpp_double_min_exponent10 __glibcpp_f80_min_exponent10
+#define __glibcpp_double_max_exponent __glibcpp_f80_max_exponent
+#define __glibcpp_double_max_exponent10 __glibcpp_f80_max_exponent10
+#else
+// You must define these macros in the configuration file.
+#endif
+
+// FIXME: These are just stubs and inkorrect
+
+#ifndef __glibcpp_double_has_infinity
+#define __glibcpp_double_has_infinity false
+#endif
+
+#ifndef __glibcpp_double_has_quiet_NaM
+#define __glibcpp_double_has_quiet_NaN false
+#endif
+
+#ifndef __glibcpp_double_has_signaling_NaN
+#define __glibcpp_double_has_signaling_NaN false
+#endif
+
+#ifndef __glibcpp_double_has_denorm
+#define __glibcpp_double_has_denorm denorm_absent
+#endif
+
+#ifndef __glibcpp_double_has_denorm_loss
+#define __glibcpp_double_has_denorm_loss false
+#endif
+
+#ifndef __glibcpp_double_infinity
+#define __glibcpp_double_infinity 0.0
+#endif
+
+#ifndef __glibcpp_double_quiet_NaN
+#define __glibcpp_double_quiet_NaN 0.0
+#endif
+
+#ifndef __glibcpp_double_signaling_NaN
+#define __glibcpp_double_signaling_NaN 0.0
+#endif
+
+#ifndef __glibcpp_double_denorm_min
+#define __glibcpp_double_denorm_min 0.0
+#endif
+
+#ifndef __glibcpp_double_is_iec559
+#define __glibcpp_double_is_iec559 false
+#endif
+
+#ifndef __glibcpp_double_is_bounded
+#define __glibcpp_double_is_bounded true
+#endif
+
+#ifndef __glibcpp_double_is_modulo
+#define __glibcpp_double_is_modulo false
+#endif
+
+#ifndef __glibcpp_double_traps
+#define __glibcpp_double_traps false
+#endif
+
+#ifndef __glibcpp_double_tinyness_before
+#define __glibcpp_double_tinyness_before false
+#endif
+
+#ifndef __glibcpp_double_round_style
+#define __glibcpp_double_round_style round_toward_zero
+#endif
+
+// long double
+
+#if __glibcpp_long_double_bits == 32
+#define __glibcpp_long_double_min __glibcpp_f32_min
+#define __glibcpp_long_double_max __glibcpp_f32_max
+#define __glibcpp_long_double_digits __glibcpp_f32_digits
+#define __glibcpp_long_double_digits10 __glibcpp_f32_digits10
+#define __glibcpp_long_double_radix __glibcpp_f32_radix
+#define __glibcpp_long_double_epsilon __glibcpp_f32_epsilon
+#define __glibcpp_long_double_round_error __glibcpp_f32_round_error
+#define __glibcpp_long_double_min_exponent __glibcpp_f32_min_exponent
+#define __glibcpp_long_double_min_exponent10 __glibcpp_f32_min_exponent10
+#define __glibcpp_long_double_max_exponent __glibcpp_f32_max_exponent
+#define __glibcpp_long_double_max_exponent10 __glibcpp_f32_max_exponent10
+#elif __glibcpp_long_double_bits == 64
+#define __glibcpp_long_double_min __glibcpp_f64_min
+#define __glibcpp_long_double_max __glibcpp_f64_max
+#define __glibcpp_long_double_digits __glibcpp_f64_digits
+#define __glibcpp_long_double_digits10 __glibcpp_f64_digits10
+#define __glibcpp_long_double_radix __glibcpp_f64_radix
+#define __glibcpp_long_double_epsilon __glibcpp_f64_epsilon
+#define __glibcpp_long_double_round_error __glibcpp_f64_round_error
+#define __glibcpp_long_double_min_exponent __glibcpp_f64_min_exponent
+#define __glibcpp_long_double_min_exponent10 __glibcpp_f64_min_exponent10
+#define __glibcpp_long_double_max_exponent __glibcpp_f64_max_exponent
+#define __glibcpp_long_double_max_exponent10 __glibcpp_f64_max_exponent10
+#elif __glibcpp_long_double_bits == 80
+#define __glibcpp_long_double_min __glibcpp_f80_min
+#define __glibcpp_long_double_max __glibcpp_f80_max
+#define __glibcpp_long_double_digits __glibcpp_f80_digits
+#define __glibcpp_long_double_digits10 __glibcpp_f80_digits10
+#define __glibcpp_long_double_radix __glibcpp_f80_radix
+#define __glibcpp_long_double_epsilon __glibcpp_f80_epsilon
+#define __glibcpp_long_double_round_error __glibcpp_f80_round_error
+#define __glibcpp_long_double_min_exponent __glibcpp_f80_min_exponent
+#define __glibcpp_long_double_min_exponent10 __glibcpp_f80_min_exponent10
+#define __glibcpp_long_double_max_exponent __glibcpp_f80_max_exponent
+#define __glibcpp_long_double_max_exponent10 __glibcpp_f80_max_exponent10
+#elif __glibcpp_long_double_bits == 96
+#define __glibcpp_long_double_min __glibcpp_f96_min
+#define __glibcpp_long_double_max __glibcpp_f96_max
+#define __glibcpp_long_double_digits __glibcpp_f96_digits
+#define __glibcpp_long_double_digits10 __glibcpp_f96_digits10
+#define __glibcpp_long_double_radix __glibcpp_f96_radix
+#define __glibcpp_long_double_epsilon __glibcpp_f96_epsilon
+#define __glibcpp_long_double_round_error __glibcpp_f96_round_error
+#define __glibcpp_long_double_min_exponent __glibcpp_f96_min_exponent
+#define __glibcpp_long_double_min_exponent10 __glibcpp_f96_min_exponent10
+#define __glibcpp_long_double_max_exponent __glibcpp_f96_max_exponent
+#define __glibcpp_long_double_max_exponent10 __glibcpp_f96_max_exponent10
+#elif __glibcpp_long_double_bits == 128
+#define __glibcpp_long_double_min __glibcpp_f128_min
+#define __glibcpp_long_double_max __glibcpp_f128_max
+#define __glibcpp_long_double_digits __glibcpp_f128_digits
+#define __glibcpp_long_double_digits10 __glibcpp_f128_digits10
+#define __glibcpp_long_double_radix __glibcpp_f128_radix
+#define __glibcpp_long_double_epsilon __glibcpp_f128_epsilon
+#define __glibcpp_long_double_round_error __glibcpp_f128_round_error
+#define __glibcpp_long_double_min_exponent __glibcpp_f128_min_exponent
+#define __glibcpp_long_double_min_exponent10 __glibcpp_f128_min_exponent10
+#define __glibcpp_long_double_max_exponent __glibcpp_f128_max_exponent
+#define __glibcpp_long_double_max_exponent10 __glibcpp_f128_max_exponent10
+#else
+// You must define these macros in the configuration file.
+#endif
+
+// FIXME: These are just stubs and inkorrect
+
+#ifndef __glibcpp_long_double_has_infinity
+#define __glibcpp_long_double_has_infinity false
+#endif
+
+#ifndef __glibcpp_long_double_has_quiet_NaN
+#define __glibcpp_long_double_has_quiet_NaN false
+#endif
+
+#ifndef __glibcpp_long_double_has_signaling_NaN
+#define __glibcpp_long_double_has_signaling_NaN false
+#endif
+
+#ifndef __glibcpp_long_double_has_denorm
+#define __glibcpp_long_double_has_denorm denorm_absent
+#endif
+
+#ifndef __glibcpp_long_double_has_denorm_loss
+#define __glibcpp_long_double_has_denorm_loss false
+#endif
+
+#ifndef __glibcpp_long_double_infinity
+#define __glibcpp_long_double_infinity 0.0L
+#endif
+
+#ifndef __glibcpp_long_double_quiet_NaN
+#define __glibcpp_long_double_quiet_NaN 0.0L
+#endif
+
+#ifndef __glibcpp_long_double_signaling_NaN
+#define __glibcpp_long_double_signaling_NaN 0.0L
+#endif
+
+#ifndef __glibcpp_long_double_denorm_min
+#define __glibcpp_long_double_denorm_min 0.0L
+#endif
+
+#ifndef __glibcpp_long_double_is_iec559
+#define __glibcpp_long_double_is_iec559 false
+#endif
+
+#ifndef __glibcpp_long_double_is_bounded
+#define __glibcpp_long_double_is_bounded true
+#endif
+
+#ifndef __glibcpp_long_double_is_modulo
+#define __glibcpp_long_double_is_modulo false
+#endif
+
+#ifndef __glibcpp_long_double_traps
+#define __glibcpp_long_double_traps false
+#endif
+
+#ifndef __glibcpp_long_double_tinyness_before
+#define __glibcpp_long_double_tinyness_before false
+#endif
+
+#ifndef __glibcpp_long_double_round_style
+#define __glibcpp_long_double_round_style round_toward_zero
+#endif
+
+
+namespace std
+{
+  enum float_round_style 
+  {
+    round_indeterminate       = -1,
+    round_toward_zero         = 0,
+    round_to_nearest          = 1,
+    round_toward_infinity     = 2,
+    round_toward_neg_infinity = 3
+  };
+
+  enum float_denorm_style 
+  {
+    denorm_indeterminate = -1,
+    denorm_absent        = 0,
+    denorm_present       = 1
+  };
+
+  //
+  // The primary class traits
+  //
+  template<typename _Tp> 
+    struct numeric_limits 
+    {
+      static const bool is_specialized = false;
+
+      static _Tp min() throw() { return static_cast<_Tp>(0); }
+      static _Tp max() throw() { return static_cast<_Tp>(0); }
+
+      static const int digits = 0;
+      static const int digits10 = 0;
+      static const bool is_signed = false;
+      static const bool is_integer = false;
+      static const bool is_exact = false;
+      static const int radix = 0;
+
+      static _Tp epsilon() throw() { return static_cast<_Tp>(0); }
+      static _Tp round_error() throw() { return static_cast<_Tp>(0); }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static _Tp infinity() throw()  { return static_cast<_Tp>(0); }
+      static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); }
+      static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); }
+      static _Tp denorm_min() throw() { return static_cast<_Tp>(0); }
+
+      static const bool is_iec559 = false;
+      static const bool is_bounded = false;
+      static const bool is_modulo = false;
+
+      static const bool traps = false;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+  template<typename _Tp> 
+    const bool
+    numeric_limits<_Tp>::is_specialized;
+
+  template<typename _Tp> 
+    const int
+    numeric_limits<_Tp>::digits;
+
+  template<typename _Tp> 
+    const int
+    numeric_limits<_Tp>::digits10;
+
+  template<typename _Tp> 
+    const bool
+    numeric_limits<_Tp>::is_signed;
+
+  template<typename _Tp> 
+    const bool
+    numeric_limits<_Tp>::is_integer;
+
+  template<typename _Tp> 
+    const bool
+    numeric_limits<_Tp>::is_exact;
+
+  template<typename _Tp> 
+    const int
+    numeric_limits<_Tp>::radix;
+
+  template<typename _Tp> 
+    const int
+    numeric_limits<_Tp>::min_exponent;
+
+  template<typename _Tp> 
+    const int
+    numeric_limits<_Tp>::min_exponent10;
+
+  template<typename _Tp> 
+    const int
+    numeric_limits<_Tp>::max_exponent;
+
+  template<typename _Tp> 
+    const int
+    numeric_limits<_Tp>::max_exponent10;
+
+  template<typename _Tp> 
+    const bool
+    numeric_limits<_Tp>::has_infinity;
+
+  template<typename _Tp> 
+    const bool
+    numeric_limits<_Tp>::has_quiet_NaN;
+
+  template<typename _Tp> 
+    const bool
+    numeric_limits<_Tp>::has_signaling_NaN;
+
+  template<typename _Tp> 
+    const float_denorm_style
+    numeric_limits<_Tp>::has_denorm;
+
+  template<typename _Tp> 
+    const bool
+    numeric_limits<_Tp>::has_denorm_loss;
+
+  template<typename _Tp> 
+    const bool
+    numeric_limits<_Tp>::is_iec559;
+
+  template<typename _Tp> 
+    const bool
+    numeric_limits<_Tp>::is_bounded;
+
+  template<typename _Tp> 
+    const bool
+    numeric_limits<_Tp>::is_modulo;
+
+  template<typename _Tp> 
+    const bool
+    numeric_limits<_Tp>::traps;
+
+  template<typename _Tp> 
+    const bool
+    numeric_limits<_Tp>::tinyness_before;
+
+  template<typename _Tp> 
+    const float_round_style
+    numeric_limits<_Tp>::round_style;
+
+  // Now there follow 15 explicit specializations.  Yes, 15.  Make sure
+  // you get the count right.
+  
+  template<>
+    struct numeric_limits<bool>
+    {
+      static const bool is_specialized = true;
+
+      static bool min() throw()
+      { return false; }
+
+      static bool max() throw()
+      { return true; }
+
+      static const int digits = __glibcpp_bool_digits;
+      static const int digits10 = 0;
+      static const bool is_signed = false;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static bool epsilon() throw()
+      { return false; }
+      static bool round_error() throw()
+      { return false; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static bool infinity() throw()
+      { return false; }
+      static bool quiet_NaN() throw()
+      { return false; }
+      static bool signaling_NaN() throw()
+      { return false; }
+      static bool denorm_min() throw()
+      { return false; }
+
+      static const bool is_iec559 = true;
+      static const bool is_bounded = true;
+      static const bool is_modulo = true;
+
+      // It is not clear what it means for a boolean type to trap.
+      // This is a DR on the LWG issue list.  Here, I use integer
+      // promotion semantics.
+      static const bool traps = __glibcpp_signed_int_traps
+               || __glibcpp_signed_long_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_bool_digits  
+  
+  template<>
+    struct numeric_limits<char>
+    {
+      static const bool is_specialized = true;
+
+      static char min() throw()
+      { return __glibcpp_char_min; }
+      static char max() throw()
+      { return __glibcpp_char_max; }
+
+      static const int digits = __glibcpp_char_digits;
+      static const int digits10 = __glibcpp_char_digits10;
+      static const bool is_signed = __glibcpp_plain_char_is_signed;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static char epsilon() throw()
+      { return char(); }
+      static char round_error() throw()
+      { return char(); }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static char infinity() throw()
+      { return char(); }
+      static char quiet_NaN() throw()
+      { return char(); }
+      static char signaling_NaN() throw()
+      { return char(); }
+      static char denorm_min() throw()
+      { return static_cast<char>(0); }
+
+      static const bool is_iec559 = false;
+      static const bool is_bounded = true;
+      static const bool is_modulo = __glibcpp_char_is_modulo;
+
+      static const bool traps = __glibcpp_char_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_char_min
+#undef __glibcpp_char_max  
+#undef __glibcpp_char_digits
+#undef __glibcpp_char_digits10
+#undef __glibcpp_char_is_signed
+#undef __glibcpp_char_is_modulo
+#undef __glibcpp_char_traps
+
+
+
+  template<>
+    struct numeric_limits<signed char>
+    {
+      static const bool is_specialized = true;
+
+      static signed char min() throw()
+      { return __glibcpp_signed_char_min; }
+      static signed char max() throw()
+      { return __glibcpp_signed_char_max; }
+
+      static const int digits = __glibcpp_signed_char_digits;
+      static const int digits10 = __glibcpp_signed_char_digits10;
+      static const bool is_signed = true;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static signed char epsilon() throw()
+      { return 0; }
+      static signed char round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static signed char infinity() throw()
+      { return static_cast<signed char>(0); }
+      static signed char quiet_NaN() throw()
+      { return static_cast<signed char>(0); }
+      static signed char signaling_NaN() throw()
+      { return static_cast<signed char>(0); }
+      static signed char denorm_min() throw()
+      { return static_cast<signed char>(0); }
+
+      static const bool is_iec559 = false;
+      static const bool is_bounded = true;
+      static const bool is_modulo = __glibcpp_signed_char_is_modulo;
+
+      static const bool traps = __glibcpp_signed_char_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_signed_char_min
+#undef __glibcpp_signed_char_max
+#undef __glibcpp_signed_char_digits
+#undef __glibcpp_signed_char_digits10
+#undef __glibcpp_signed_char_is_modulo  
+#undef __glibcpp_signed_char_traps  
+
+  template<>
+    struct numeric_limits<unsigned char>
+    {
+      static const bool is_specialized = true;
+
+      static unsigned char min() throw()
+      { return 0; }
+      static unsigned char max() throw()
+      { return __glibcpp_unsigned_char_max; }
+
+      static const int digits = __glibcpp_unsigned_char_digits;
+      static const int digits10 = __glibcpp_unsigned_char_digits10;
+      static const bool is_signed = false;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static unsigned char epsilon() throw()
+      { return 0; }
+      static unsigned char round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static unsigned char infinity() throw()
+      { return static_cast<unsigned char>(0); }
+      static unsigned char quiet_NaN() throw()
+      { return static_cast<unsigned char>(0); }
+      static unsigned char signaling_NaN() throw()
+      { return static_cast<unsigned char>(0); }
+      static unsigned char denorm_min() throw()
+      { return static_cast<unsigned char>(0); }
+
+      static const bool is_iec559 = false;
+      static const bool is_bounded = true;
+      static const bool is_modulo = true;
+
+      static const bool traps = __glibcpp_unsigned_char_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_unsigned_char_max
+#undef __glibcpp_unsigned_char_digits
+#undef __glibcpp_unsigned_char_digits10
+#undef __glibcpp_unsigned_char_traps  
+
+  template<>
+    struct numeric_limits<wchar_t>
+    {
+      static const bool is_specialized = true;
+
+      static wchar_t min() throw()
+      { return __glibcpp_wchar_t_min; }
+      static wchar_t max() throw()
+      { return __glibcpp_wchar_t_max; }
+
+      static const int digits = __glibcpp_wchar_t_digits;
+      static const int digits10 = __glibcpp_wchar_t_digits10;
+      static const bool is_signed = __glibcpp_wchar_t_is_signed;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static wchar_t epsilon() throw()
+      { return 0; }
+      static wchar_t round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static wchar_t infinity() throw()
+      { return wchar_t(); }
+      static wchar_t quiet_NaN() throw()
+      { return wchar_t(); }
+      static wchar_t signaling_NaN() throw()
+      { return wchar_t(); }
+      static wchar_t denorm_min() throw()
+      { return wchar_t(); }
+
+      static const bool is_iec559 = false;
+      static const bool is_bounded = true;
+      static const bool is_modulo = __glibcpp_wchar_t_is_modulo;
+
+      static const bool traps = __glibcpp_wchar_t_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_wchar_t_min
+#undef __glibcpp_wchar_t_max
+#undef __glibcpp_wchar_t_digits
+#undef __glibcpp_wchar_t_digits10  
+#undef __glibcpp_wchar_t_is_signed
+#undef __glibcpp_wchar_t_is_modulo
+#undef __glibcpp_wchar_t_traps  
+  
+  template<>
+    struct numeric_limits<short>
+    {
+      static const bool is_specialized = true;
+
+      static short min() throw()
+      { return __glibcpp_signed_short_min; }
+      static short max() throw()
+      { return __glibcpp_signed_short_max; }
+
+      static const int digits = __glibcpp_signed_short_digits;
+      static const int digits10 = __glibcpp_signed_short_digits10;
+      static const bool is_signed = true;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static short epsilon() throw()
+      { return 0; }
+      static short round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static short infinity() throw()
+      { return short(); }
+      static short quiet_NaN() throw()
+      { return short(); }
+      static short signaling_NaN() throw()
+      { return short(); }
+      static short denorm_min() throw()
+      { return short(); }
+
+      static const bool is_iec559 = true;
+      static const bool is_bounded = true;
+      static const bool is_modulo = __glibcpp_signed_short_is_modulo;
+
+      static const bool traps = __glibcpp_signed_short_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_signed_short_min
+#undef __glibcpp_signed_short_max
+#undef __glibcpp_signed_short_digits
+#undef __glibcpp_signed_short_digits10
+#undef __glibcpp_signed_short_is_modulo
+#undef __glibcpp_signed_short_traps  
+  
+  template<>
+    struct numeric_limits<unsigned short>
+    {
+      static const bool is_specialized = true;
+
+      static unsigned short min() throw()
+      { return 0; }
+      static unsigned short max() throw()
+      { return __glibcpp_unsigned_short_max; }
+
+      static const int digits = __glibcpp_unsigned_short_digits;
+      static const int digits10 = __glibcpp_unsigned_short_digits10;
+      static const bool is_signed = false;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static unsigned short epsilon() throw()
+      { return 0; }
+      static unsigned short round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static unsigned short infinity() throw()
+      { return static_cast<unsigned short>(0); }
+      static unsigned short quiet_NaN() throw()
+      { return static_cast<unsigned short>(0); }
+      static unsigned short signaling_NaN() throw()
+      { return static_cast<unsigned short>(0); }
+      static unsigned short denorm_min() throw()
+      { return static_cast<unsigned short>(0); }
+
+      static const bool is_iec559 = true;
+      static const bool is_bounded = true;
+      static const bool is_modulo = true;
+
+      static const bool traps = __glibcpp_unsigned_short_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_unsigned_short_max
+#undef __glibcpp_unsigned_short_digits
+#undef __glibcpp_unsigned_short_digits10
+#undef __glibcpp_unsigned_short_traps  
+  
+  template<>
+    struct numeric_limits<int>
+    {
+      static const bool is_specialized = true;
+
+      static int min() throw()
+      { return __glibcpp_signed_int_min; }
+      static int max() throw()
+      { return __glibcpp_signed_int_max; }
+
+      static const int digits = __glibcpp_signed_int_digits;
+      static const int digits10 = __glibcpp_signed_int_digits10;
+      static const bool is_signed = true;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static int epsilon() throw()
+      { return 0; }
+      static int round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static int infinity() throw()
+      { return static_cast<int>(0); }
+      static int quiet_NaN() throw()
+      { return static_cast<int>(0); }
+      static int signaling_NaN() throw()
+      { return static_cast<int>(0); }
+      static int denorm_min() throw()
+      { return static_cast<int>(0); }
+
+      static const bool is_iec559 = true;
+      static const bool is_bounded = true;
+      static const bool is_modulo = __glibcpp_signed_int_is_modulo;
+
+      static const bool traps = __glibcpp_signed_int_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_signed_int_min
+#undef __glibcpp_signed_int_max
+#undef __glibcpp_signed_int_digits
+#undef __glibcpp_signed_int_digits10
+#undef __glibcpp_signed_int_is_modulo
+#undef __glibcpp_signed_int_traps  
+  
+  template<>
+    struct numeric_limits<unsigned int>
+    {
+      static const bool is_specialized = true;
+
+      static unsigned int min() throw()
+      { return 0; }
+          static unsigned int max() throw()
+      { return __glibcpp_unsigned_int_max; }
+
+      static const int digits = __glibcpp_unsigned_int_digits;
+      static const int digits10 = __glibcpp_unsigned_int_digits10;
+      static const bool is_signed = false;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static unsigned int epsilon() throw()
+      { return 0; }
+      static unsigned int round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static unsigned int infinity() throw()
+      { return static_cast<unsigned int>(0); }
+      static unsigned int quiet_NaN() throw()
+      { return static_cast<unsigned int>(0); }
+      static unsigned int signaling_NaN() throw()
+      { return static_cast<unsigned int>(0); }
+      static unsigned int denorm_min() throw()
+      { return static_cast<unsigned int>(0); }
+
+      static const bool is_iec559 = true;
+      static const bool is_bounded = true;
+      static const bool is_modulo = true;
+
+      static const bool traps = __glibcpp_unsigned_int_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_unsigned_int_max
+#undef __glibcpp_unsigned_int_digits
+#undef __glibcpp_unsigned_int_digits10
+#undef __glibcpp_unsigned_int_traps  
+
+  template<>
+    struct numeric_limits<long>
+    {
+      static const bool is_specialized = true;
+
+      static long min() throw()
+      { return __glibcpp_signed_long_min; }
+      static long max() throw()
+      { return __glibcpp_signed_long_max; }
+
+      static const int digits = __glibcpp_signed_long_digits;
+      static const int digits10 = __glibcpp_signed_long_digits10;
+      static const bool is_signed = true;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static long epsilon() throw()
+      { return 0; }
+      static long round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static long infinity() throw()
+      { return static_cast<long>(0); }
+      static long quiet_NaN() throw()
+      { return static_cast<long>(0); }
+      static long signaling_NaN() throw()
+      { return static_cast<long>(0); }
+      static long denorm_min() throw()
+      { return static_cast<long>(0); }
+
+      static const bool is_iec559 = true;
+      static const bool is_bounded = true;
+      static const bool is_modulo = __glibcpp_signed_long_is_modulo;
+
+      static const bool traps = __glibcpp_signed_long_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_signed_long_min
+#undef __glibcpp_signed_long_max
+#undef __glibcpp_signed_long_digits
+#undef __glibcpp_signed_long_digits10
+#undef __glibcpp_signed_long_is_modulo
+#undef __glibcpp_signed_long_traps  
+  
+  template<>
+    struct numeric_limits<unsigned long>
+    {
+      static const bool is_specialized = true;
+
+      static unsigned long min() throw()
+      { return 0; }
+      static unsigned long max() throw()
+      { return __glibcpp_unsigned_long_max; }
+
+      static const int digits = __glibcpp_unsigned_long_digits;
+      static const int digits10 = __glibcpp_unsigned_long_digits10;
+      static const bool is_signed = false;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static unsigned long epsilon() throw()
+      { return 0; }
+      static unsigned long round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static unsigned long infinity() throw()
+      { return static_cast<unsigned long>(0); }
+      static unsigned long quiet_NaN() throw()
+      { return static_cast<unsigned long>(0); }
+      static unsigned long signaling_NaN() throw()
+      { return static_cast<unsigned long>(0); }
+      static unsigned long denorm_min() throw()
+      { return static_cast<unsigned long>(0); }
+
+      static const bool is_iec559 = true;
+      static const bool is_bounded = true;
+      static const bool is_modulo = true;
+
+      static const bool traps = __glibcpp_unsigned_long_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_unsigned_long_max
+#undef __glibcpp_unsigned_long_digits
+#undef __glibcpp_unsigned_long_digits10
+#undef __glibcpp_unsigned_long_traps  
+
+  template<>
+    struct numeric_limits<long long>
+    {
+      static const bool is_specialized = true;
+      
+      static long long min() throw()
+      { return __glibcpp_signed_long_long_min; }
+      static long long max() throw()
+      { return __glibcpp_signed_long_long_max; }
+      
+      static const int digits = __glibcpp_signed_long_long_digits;
+      static const int digits10 = __glibcpp_signed_long_long_digits10;
+      static const bool is_signed = true;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static long long epsilon() throw()
+      { return 0; }
+      static long long round_error() throw()
+      { return 0; }
+      
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+      
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+      
+      static long long infinity() throw()
+      { return static_cast<long long>(0); }
+      static long long quiet_NaN() throw()
+      { return static_cast<long long>(0); }
+      static long long signaling_NaN() throw()
+      { return static_cast<long long>(0); }
+      static long long denorm_min() throw()
+      { return static_cast<long long>(0); }
+      
+      static const bool is_iec559 = true;
+      static const bool is_bounded = true;
+      static const bool is_modulo = __glibcpp_signed_long_long_is_modulo;
+
+      static const bool traps = __glibcpp_signed_long_long_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_signed_long_long_min
+#undef __glibcpp_signed_long_long_max
+#undef __glibcpp_signed_long_long_digits
+#undef __glibcpp_signed_long_long_digits10
+#undef __glibcpp_signed_long_long_is_modulo
+#undef __glibcpp_signed_long_long_traps  
+  
+  template<>
+    struct numeric_limits<unsigned long long>
+    {
+      static const bool is_specialized = true;
+
+      static unsigned long long min() throw()
+      { return 0; }
+      static unsigned long long max() throw()
+      { return __glibcpp_unsigned_long_long_max; }
+
+      static const int digits = __glibcpp_unsigned_long_long_digits;
+      static const int digits10 = __glibcpp_unsigned_long_long_digits10;
+      static const bool is_signed = false;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static unsigned long long epsilon() throw()
+      { return 0; }
+      static unsigned long long round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static unsigned long long infinity() throw()
+      { return static_cast<unsigned long long>(0); }
+      static unsigned long long quiet_NaN() throw()
+      { return static_cast<unsigned long long>(0); }
+      static unsigned long long signaling_NaN() throw()
+      { return static_cast<unsigned long long>(0); }
+      static unsigned long long denorm_min() throw()
+      { return static_cast<unsigned long long>(0); }
+
+      static const bool is_iec559 = true;
+      static const bool is_bounded = true;
+      static const bool is_modulo = true;
+
+      static const bool traps = true;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_unsigned_long_long_max
+#undef __glibcpp_unsigned_long_long_digits
+#undef __glibcpp_unsigned_long_long_digits10
+#undef __glibcpp_unsigned_long_long_traps  
+
+  template<>
+    struct numeric_limits<float>
+    {
+      static const bool is_specialized = true;
+
+      static float min() throw()
+      { return __glibcpp_float_min; }
+      static float max() throw()
+      { return __glibcpp_float_max; }
+
+      static const int digits = __glibcpp_float_digits;
+      static const int digits10 = __glibcpp_float_digits10;
+      static const bool is_signed = true;
+      static const bool is_integer = false;
+      static const bool is_exact = false;
+      static const int radix = __glibcpp_float_radix;
+      static float epsilon() throw()
+      { return __glibcpp_float_epsilon; }
+      static float round_error() throw()
+      { return __glibcpp_float_round_error; }
+
+      static const int min_exponent = __glibcpp_float_min_exponent;
+      static const int min_exponent10 = __glibcpp_float_min_exponent10;
+      static const int max_exponent = __glibcpp_float_max_exponent;
+      static const int max_exponent10 = __glibcpp_float_max_exponent10;
+
+      static const bool has_infinity = __glibcpp_float_has_infinity;
+      static const bool has_quiet_NaN = __glibcpp_float_has_quiet_NaN;
+      static const bool has_signaling_NaN = __glibcpp_float_has_signaling_NaN;
+      static const float_denorm_style has_denorm = __glibcpp_float_has_denorm;
+      static const bool has_denorm_loss = __glibcpp_float_has_denorm_loss;
+
+      static float infinity() throw()
+      { return __glibcpp_float_infinity; }
+      static float quiet_NaN() throw()
+      { return __glibcpp_float_quiet_NaN; }
+      static float signaling_NaN() throw()
+      { return __glibcpp_float_signaling_NaN; }
+      static float denorm_min() throw()
+      { return __glibcpp_float_denorm_min; }
+
+      static const bool is_iec559 = __glibcpp_float_is_iec559;
+      static const bool is_bounded = __glibcpp_float_is_bounded;
+      static const bool is_modulo = __glibcpp_float_is_modulo;
+
+      static const bool traps = __glibcpp_float_traps;
+      static const bool tinyness_before = __glibcpp_float_tinyness_before;
+      static const float_round_style round_style = __glibcpp_float_round_style;
+    };
+
+#undef __glibcpp_float_min
+#undef __glibcpp_float_max
+#undef __glibcpp_float_digits
+#undef __glibcpp_float_digits10
+#undef __glibcpp_float_radix
+#undef __glibcpp_float_round_error
+#undef __glibcpp_float_min_exponent
+#undef __glibcpp_float_min_exponent10
+#undef __glibcpp_float_max_exponent
+#undef __glibcpp_float_max_exponent10
+#undef __glibcpp_float_has_infinity
+#undef __glibcpp_float_has_quiet_NaN
+#undef __glibcpp_float_has_signaling_NaN
+#undef __glibcpp_float_has_denorm
+#undef __glibcpp_float_has_denorm_loss
+#undef __glibcpp_float_infinity
+#undef __glibcpp_float_quiet_NaN
+#undef __glibcpp_float_signaling_NaN
+#undef __glibcpp_float_denorm_min
+#undef __glibcpp_float_is_iec559
+#undef __glibcpp_float_is_bounded
+#undef __glibcpp_float_is_modulo
+#undef __glibcpp_float_traps
+#undef __glibcpp_float_tinyness_before
+#undef __glibcpp_float_round_style  
+
+  template<>
+    struct numeric_limits<double>
+    {
+      static const bool is_specialized = true;
+
+      static double min() throw()
+      { return __glibcpp_double_min; }
+      static double max() throw()
+      { return __glibcpp_double_max; }
+
+      static const int digits = __glibcpp_double_digits;
+      static const int digits10 = __glibcpp_double_digits10;
+      static const bool is_signed = true;
+      static const bool is_integer = false;
+      static const bool is_exact = false;
+      static const int radix = __glibcpp_double_radix;
+      static double epsilon() throw()
+      { return __glibcpp_double_epsilon; }
+      static double round_error() throw()
+      { return __glibcpp_double_round_error; }
+
+      static const int min_exponent = __glibcpp_double_min_exponent;
+      static const int min_exponent10 = __glibcpp_double_min_exponent10;
+      static const int max_exponent = __glibcpp_double_max_exponent;
+      static const int max_exponent10 = __glibcpp_double_max_exponent10;
+
+      static const bool has_infinity = __glibcpp_double_has_infinity;
+      static const bool has_quiet_NaN = __glibcpp_double_has_quiet_NaN;
+      static const bool has_signaling_NaN = __glibcpp_double_has_signaling_NaN;
+      static const float_denorm_style has_denorm =
+              __glibcpp_double_has_denorm;
+      static const bool has_denorm_loss = __glibcpp_double_has_denorm_loss;
+
+      static double infinity() throw()
+      { return __glibcpp_double_infinity; }
+      static double quiet_NaN() throw()
+      { return __glibcpp_double_quiet_NaN; }
+      static double signaling_NaN() throw()
+      { return __glibcpp_double_signaling_NaN; }
+      static double denorm_min() throw()
+      { return __glibcpp_double_denorm_min; }
+
+      static const bool is_iec559 = __glibcpp_double_is_iec559;
+      static const bool is_bounded = __glibcpp_double_is_bounded;
+      static const bool is_modulo = __glibcpp_double_is_modulo;
+
+      static const bool traps = __glibcpp_double_traps;
+      static const bool tinyness_before = __glibcpp_double_tinyness_before;
+      static const float_round_style round_style =
+              __glibcpp_double_round_style;
+    };
+
+#undef __glibcpp_double_min
+#undef __glibcpp_double_max
+#undef __glibcpp_double_digits
+#undef __glibcpp_double_digits10
+#undef __glibcpp_double_radix
+#undef __glibcpp_double_round_error
+#undef __glibcpp_double_min_exponent
+#undef __glibcpp_double_min_exponent10
+#undef __glibcpp_double_max_exponent
+#undef __glibcpp_double_max_exponent10
+#undef __glibcpp_double_has_infinity
+#undef __glibcpp_double_has_quiet_NaN
+#undef __glibcpp_double_has_signaling_NaN
+#undef __glibcpp_double_has_denorm
+#undef __glibcpp_double_has_denorm_loss
+#undef __glibcpp_double_infinity
+#undef __glibcpp_double_quiet_NaN
+#undef __glibcpp_double_signaling_NaN
+#undef __glibcpp_double_denorm_min
+#undef __glibcpp_double_is_iec559
+#undef __glibcpp_double_is_bounded
+#undef __glibcpp_double_is_modulo
+#undef __glibcpp_double_traps
+#undef __glibcpp_double_tinyness_before
+#undef __glibcpp_double_round_style  
+  
+  
+  template<>
+    struct numeric_limits<long double>
+    {
+      static const bool is_specialized = true;
+
+      static long double min() throw()
+      { return __glibcpp_long_double_min; }
+      static long double max() throw()
+      { return __glibcpp_long_double_max; }
+
+      static const int digits = __glibcpp_long_double_digits;
+      static const int digits10 = __glibcpp_long_double_digits10;
+      static const bool is_signed = true;
+      static const bool is_integer = false;
+      static const bool is_exact = false;
+      static const int radix = __glibcpp_long_double_radix;
+      static long double epsilon() throw()
+      { return __glibcpp_long_double_epsilon; }
+      static long double round_error() throw()
+      { return __glibcpp_long_double_round_error; }
+
+      static const int min_exponent = __glibcpp_long_double_min_exponent;
+      static const int min_exponent10 = __glibcpp_long_double_min_exponent10;
+      static const int max_exponent = __glibcpp_long_double_max_exponent;
+      static const int max_exponent10 = __glibcpp_long_double_max_exponent10;
+
+      static const bool has_infinity = __glibcpp_long_double_has_infinity;
+      static const bool has_quiet_NaN = __glibcpp_long_double_has_quiet_NaN;
+      static const bool has_signaling_NaN =
+                __glibcpp_long_double_has_signaling_NaN;
+      static const float_denorm_style has_denorm =
+                __glibcpp_long_double_has_denorm;
+      static const bool has_denorm_loss =
+                __glibcpp_long_double_has_denorm_loss;
+
+      static long double infinity() throw()
+      { return __glibcpp_long_double_infinity; }
+      static long double quiet_NaN() throw()
+      { return __glibcpp_long_double_quiet_NaN; }
+      static long double signaling_NaN() throw()
+      { return __glibcpp_long_double_signaling_NaN; }
+      static long double denorm_min() throw()
+      { return __glibcpp_long_double_denorm_min; }
+
+      static const bool is_iec559 = __glibcpp_long_double_is_iec559;
+      static const bool is_bounded = __glibcpp_long_double_is_bounded;
+      static const bool is_modulo = __glibcpp_long_double_is_modulo;
+
+      static const bool traps = __glibcpp_long_double_traps; 
+      static const bool tinyness_before = __glibcpp_long_double_tinyness_before;
+      static const float_round_style round_style = 
+        __glibcpp_long_double_round_style;
+    };
+
+#undef __glibcpp_long_double_min
+#undef __glibcpp_long_double_max
+#undef __glibcpp_long_double_digits
+#undef __glibcpp_long_double_digits10
+#undef __glibcpp_long_double_radix
+#undef __glibcpp_long_double_round_error
+#undef __glibcpp_long_double_min_exponent
+#undef __glibcpp_long_double_min_exponent10
+#undef __glibcpp_long_double_max_exponent
+#undef __glibcpp_long_double_max_exponent10
+#undef __glibcpp_long_double_has_infinity
+#undef __glibcpp_long_double_has_quiet_NaN
+#undef __glibcpp_long_double_has_signaling_NaN
+#undef __glibcpp_long_double_has_denorm
+#undef __glibcpp_long_double_has_denorm_loss
+#undef __glibcpp_long_double_infinity
+#undef __glibcpp_long_double_quiet_NaN
+#undef __glibcpp_long_double_signaling_NaN
+#undef __glibcpp_long_double_denorm_min
+#undef __glibcpp_long_double_is_iec559
+#undef __glibcpp_long_double_is_bounded
+#undef __glibcpp_long_double_is_modulo
+#undef __glibcpp_long_double_traps
+#undef __glibcpp_long_double_tinyness_before
+#undef __glibcpp_long_double_round_style  
+  
+} // namespace std
+
+#endif // _CPP_NUMERIC_LIMITS
diff --git a/libstdc++-v3/include/std/std_list.h b/libstdc++-v3/include/std/std_list.h
new file mode 100644 (file)
index 0000000..683e0a7
--- /dev/null
@@ -0,0 +1,77 @@
+// <list> -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file std_list.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_LIST
+#define _CPP_LIST 1
+
+#pragma GCC system_header
+
+#include <bits/functexcept.h>
+#include <bits/stl_algobase.h>
+#include <bits/stl_alloc.h>
+#include <bits/stl_construct.h>
+#include <bits/stl_uninitialized.h>
+#include <bits/stl_list.h>
+
+#endif /* _CPP_LIST */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/libstdc++-v3/include/std/std_locale.h b/libstdc++-v3/include/std/std_locale.h
new file mode 100644 (file)
index 0000000..82089d0
--- /dev/null
@@ -0,0 +1,52 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+
+/** @file std_locale.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_LOCALE
+#define _CPP_LOCALE    1
+
+#pragma GCC system_header
+
+#include <bits/localefwd.h>
+#include <bits/locale_facets.h>
+#include <bits/locale_facets.tcc>
+
+#endif
+
+// Local Variables:
+// mode:c++
+// End:
diff --git a/libstdc++-v3/include/std/std_map.h b/libstdc++-v3/include/std/std_map.h
new file mode 100644 (file)
index 0000000..0dd38bf
--- /dev/null
@@ -0,0 +1,74 @@
+// <map> -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file std_map.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_MAP
+#define _CPP_MAP 1
+
+#pragma GCC system_header
+
+#include <bits/stl_tree.h>
+#include <bits/stl_map.h>
+#include <bits/stl_multimap.h>
+
+#endif /* _CPP_MAP */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/libstdc++-v3/include/std/std_memory.h b/libstdc++-v3/include/std/std_memory.h
new file mode 100644 (file)
index 0000000..c9a2e59
--- /dev/null
@@ -0,0 +1,149 @@
+// <memory> -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/*
+ * Copyright (c) 1997-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file std_memory.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_MEMORY
+#define _CPP_MEMORY 1
+
+#pragma GCC system_header
+
+#include <bits/stl_algobase.h>
+#include <bits/stl_alloc.h>
+#include <bits/stl_construct.h>
+#include <bits/stl_iterator_base_types.h> //for iterator_traits
+#include <bits/stl_tempbuf.h>
+#include <bits/stl_uninitialized.h>
+#include <bits/stl_raw_storage_iter.h>
+
+namespace std
+{
+
+ template<class _Tp1> struct auto_ptr_ref {
+   _Tp1* _M_ptr;
+   auto_ptr_ref(_Tp1* __p) : _M_ptr(__p) {}
+};
+
+/**
+ *  A simple smart pointer providing strict ownership semantics.  (More later.)
+*/
+template <class _Tp> class auto_ptr {
+private:
+  _Tp* _M_ptr;
+
+public:
+  typedef _Tp element_type;
+
+  explicit auto_ptr(_Tp* __p = 0) throw() : _M_ptr(__p) {}
+  auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) {}
+
+  template <class _Tp1> auto_ptr(auto_ptr<_Tp1>& __a) throw()
+    : _M_ptr(__a.release()) {}
+
+  auto_ptr& operator=(auto_ptr& __a) throw() {
+    reset(__a.release());
+    return *this;
+  }
+
+  template <class _Tp1>
+  auto_ptr& operator=(auto_ptr<_Tp1>& __a) throw() {
+    reset(__a.release());
+    return *this;
+  }
+  
+  // Note: The C++ standard says there is supposed to be an empty throw
+  // specification here, but omitting it is standard conforming.  Its 
+  // presence can be detected only if _Tp::~_Tp() throws, but (17.4.3.6/2)
+  // this is prohibited.
+  ~auto_ptr() { delete _M_ptr; }
+  _Tp& operator*() const throw() {
+    return *_M_ptr;
+  }
+  _Tp* operator->() const throw() {
+    return _M_ptr;
+  }
+  _Tp* get() const throw() {
+    return _M_ptr;
+  }
+  _Tp* release() throw() {
+    _Tp* __tmp = _M_ptr;
+    _M_ptr = 0;
+    return __tmp;
+  }
+  void reset(_Tp* __p = 0) throw() {
+    if (__p != _M_ptr) {
+      delete _M_ptr;
+      _M_ptr = __p;
+    }    
+  }
+
+public:
+  auto_ptr(auto_ptr_ref<_Tp> __ref) throw()
+    : _M_ptr(__ref._M_ptr) {}
+
+  auto_ptr& operator=(auto_ptr_ref<_Tp> __ref) throw() {
+    if (__ref._M_ptr != this->get()) {
+      delete _M_ptr;
+      _M_ptr = __ref._M_ptr;
+    }
+    return *this;
+  }
+
+  template <class _Tp1> operator auto_ptr_ref<_Tp1>() throw() 
+    { return auto_ptr_ref<_Tp>(this->release()); }
+  template <class _Tp1> operator auto_ptr<_Tp1>() throw()
+    { return auto_ptr<_Tp1>(this->release()); }
+};
+
+} // namespace std
+
+#endif /* _CPP_MEMORY */
+
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/libstdc++-v3/include/std/std_numeric.h b/libstdc++-v3/include/std/std_numeric.h
new file mode 100644 (file)
index 0000000..e7a6adc
--- /dev/null
@@ -0,0 +1,75 @@
+// <numeric> -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file std_numeric.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_NUMERIC
+#define _CPP_NUMERIC 1
+
+#pragma GCC system_header
+#include <bits/c++config.h>
+#include <cstddef>
+#include <iterator>
+#include <bits/stl_function.h>
+#include <bits/stl_numeric.h>
+
+#endif /* _CPP_NUMERIC */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/libstdc++-v3/include/std/std_ostream.h b/libstdc++-v3/include/std/std_ostream.h
new file mode 100644 (file)
index 0000000..e3ec326
--- /dev/null
@@ -0,0 +1,288 @@
+// Output streams -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.6.2  Output streams
+//
+
+/** @file std_ostream.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_OSTREAM
+#define _CPP_OSTREAM   1
+
+#pragma GCC system_header
+
+#include <ios>
+
+namespace std
+{
+  // 27.6.2.1 Template class basic_ostream
+  template<typename _CharT, typename _Traits>
+    class basic_ostream : virtual public basic_ios<_CharT, _Traits>
+    {
+    public:
+
+      // Types (inherited from basic_ios (27.4.4)):
+      typedef _CharT                                   char_type;
+      typedef typename _Traits::int_type               int_type;
+      typedef typename _Traits::pos_type               pos_type;
+      typedef typename _Traits::off_type               off_type;
+      typedef _Traits                                  traits_type;
+      
+      // Non-standard Types:
+      typedef basic_streambuf<_CharT, _Traits>                 __streambuf_type;
+      typedef basic_ios<_CharT, _Traits>               __ios_type;
+      typedef basic_ostream<_CharT, _Traits>           __ostream_type;
+      typedef ostreambuf_iterator<_CharT, _Traits>     __ostreambuf_iter;
+      typedef num_put<_CharT, __ostreambuf_iter>        __numput_type;
+      typedef ctype<_CharT>                            __ctype_type;
+
+      // 27.6.2.2 Constructor/destructor:
+      explicit 
+      basic_ostream(__streambuf_type* __sb)
+      { this->init(__sb); }
+
+      virtual 
+      ~basic_ostream() { }
+
+      // 27.6.2.3 Prefix/suffix:
+      class sentry;
+      friend class sentry;
+      
+      // 27.6.2.5 Formatted output:
+      // 27.6.2.5.3  basic_ostream::operator<<
+      __ostream_type&
+      operator<<(__ostream_type& (*__pf)(__ostream_type&));
+      
+      __ostream_type&
+      operator<<(__ios_type& (*__pf)(__ios_type&));
+      
+      __ostream_type&
+      operator<<(ios_base& (*__pf) (ios_base&));
+
+      // 27.6.2.5.2 Arithmetic Inserters
+      __ostream_type& 
+      operator<<(long __n);
+      
+      __ostream_type& 
+      operator<<(unsigned long __n);
+
+      __ostream_type& 
+      operator<<(bool __n);
+
+      __ostream_type& 
+      operator<<(short __n)
+      { 
+       ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
+       if (__fmt & ios_base::oct || __fmt & ios_base::hex)
+         return this->operator<<(static_cast<unsigned long>
+                                 (static_cast<unsigned short>(__n)));
+       else
+         return this->operator<<(static_cast<long>(__n));
+      }
+
+      __ostream_type& 
+      operator<<(unsigned short __n)
+      { return this->operator<<(static_cast<unsigned long>(__n)); }
+
+      __ostream_type& 
+      operator<<(int __n)
+      { 
+       ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
+       if (__fmt & ios_base::oct || __fmt & ios_base::hex)
+         return this->operator<<(static_cast<unsigned long>
+                                 (static_cast<unsigned int>(__n)));
+       else
+         return this->operator<<(static_cast<long>(__n));
+      }
+
+      __ostream_type& 
+      operator<<(unsigned int __n)
+      { return this->operator<<(static_cast<unsigned long>(__n)); }
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+      __ostream_type& 
+      operator<<(long long __n);
+
+      __ostream_type& 
+      operator<<(unsigned long long __n);
+#endif
+
+      __ostream_type& 
+      operator<<(double __f);
+
+      __ostream_type& 
+      operator<<(float __f)
+      { return this->operator<<(static_cast<double>(__f)); }
+
+      __ostream_type& 
+      operator<<(long double __f);
+
+      __ostream_type& 
+      operator<<(const void* __p);
+
+      __ostream_type& 
+      operator<<(__streambuf_type* __sb);
+
+      // Unformatted output:
+      __ostream_type& 
+      put(char_type __c);
+
+      __ostream_type& 
+      write(const char_type* __s, streamsize __n);
+
+      __ostream_type& 
+      flush();
+
+      // Seeks:
+      pos_type 
+      tellp();
+
+      __ostream_type& 
+      seekp(pos_type);
+
+      __ostream_type& 
+      seekp(off_type, ios_base::seekdir);
+
+    private:
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+      // Not defined.  (Side effect of DR 50.)
+      __ostream_type& 
+      operator=(const __ostream_type&);
+
+      basic_ostream(const __ostream_type&);
+#endif
+    };
+
+  // 27.6.2.3  Class basic_ostream::sentry
+  template <typename _CharT, typename _Traits>
+    class basic_ostream<_CharT, _Traits>::sentry
+    {
+      // Data Members:
+      bool                             _M_ok;
+      basic_ostream<_CharT,_Traits>&   _M_os;
+      
+    public:
+      explicit
+      sentry(basic_ostream<_CharT,_Traits>& __os);
+
+      ~sentry()
+      {
+       // XXX MT
+       if (_M_os.flags() & ios_base::unitbuf && !uncaught_exception())
+         {
+           // Can't call flush directly or else will get into recursive lock.
+           if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1)
+             _M_os.setstate(ios_base::badbit);
+         }
+      }
+
+      operator bool() 
+      { return _M_ok; }
+    };
+
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits>&
+    operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c);
+
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits>&
+    operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
+    { return (__out << __out.widen(__c)); }
+
+  // Specialization
+  template <class _Traits> 
+    basic_ostream<char, _Traits>&
+    operator<<(basic_ostream<char, _Traits>& __out, char __c);
+
+  // Signed and unsigned
+  template<class _Traits>
+    basic_ostream<char, _Traits>&
+    operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
+    { return (__out << static_cast<char>(__c)); }
+  
+  template<class _Traits>
+    basic_ostream<char, _Traits>&
+    operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
+    { return (__out << static_cast<char>(__c)); }
+  
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits>&
+    operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s);
+
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits> &
+    operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s);
+
+  // Partial specializationss
+  template<class _Traits>
+    basic_ostream<char, _Traits>&
+    operator<<(basic_ostream<char, _Traits>& __out, const char* __s);
+  // Signed and unsigned
+  template<class _Traits>
+    basic_ostream<char, _Traits>&
+    operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
+    { return (__out << reinterpret_cast<const char*>(__s)); }
+
+  template<class _Traits>
+    basic_ostream<char, _Traits> &
+    operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
+    { return (__out << reinterpret_cast<const char*>(__s)); }
+
+  // 27.6.2.7 Standard basic_ostream manipulators
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits>& 
+    endl(basic_ostream<_CharT, _Traits>& __os)
+    { return flush(__os.put(__os.widen('\n'))); }
+
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits>& 
+    ends(basic_ostream<_CharT, _Traits>& __os)
+    { return __os.put(_CharT()); }
+  
+  template<typename _CharT, typename _Traits>
+    basic_ostream<_CharT, _Traits>& 
+    flush(basic_ostream<_CharT, _Traits>& __os)
+    { return __os.flush(); }
+
+} // namespace std
+
+#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
+# define export
+#ifdef  _GLIBCPP_FULLY_COMPLIANT_HEADERS
+# include <bits/ostream.tcc>
+#endif
+#endif
+
+#endif /* _CPP_OSTREAM */
+
diff --git a/libstdc++-v3/include/std/std_queue.h b/libstdc++-v3/include/std/std_queue.h
new file mode 100644 (file)
index 0000000..ecf7f4c
--- /dev/null
@@ -0,0 +1,81 @@
+// <queue> -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file std_queue.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_QUEUE
+#define _CPP_QUEUE 1
+
+#pragma GCC system_header
+#include <bits/c++config.h>
+#include <bits/functexcept.h>
+#include <bits/stl_algobase.h>
+#include <bits/stl_alloc.h>
+#include <bits/stl_construct.h>
+#include <bits/stl_uninitialized.h>
+#include <bits/stl_vector.h>
+#include <bits/stl_heap.h>
+#include <bits/stl_deque.h>
+#include <bits/stl_function.h>
+#include <bits/stl_queue.h>
+
+#endif /* _CPP_QUEUE */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/libstdc++-v3/include/std/std_set.h b/libstdc++-v3/include/std/std_set.h
new file mode 100644 (file)
index 0000000..dab8e71
--- /dev/null
@@ -0,0 +1,74 @@
+// <set> -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file std_set.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_SET
+#define _CPP_SET 1
+
+#pragma GCC system_header
+
+#include <bits/stl_tree.h>
+#include <bits/stl_set.h>
+#include <bits/stl_multiset.h>
+
+#endif /* _CPP_SET */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/libstdc++-v3/include/std/std_sstream.h b/libstdc++-v3/include/std/std_sstream.h
new file mode 100644 (file)
index 0000000..fb90986
--- /dev/null
@@ -0,0 +1,372 @@
+// String based streams -*- C++ -*-
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.7  String-based streams
+//
+
+/** @file std_sstream.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_SSTREAM
+#define _CPP_SSTREAM   1
+
+#pragma GCC system_header
+
+#include <istream>
+#include <ostream>
+
+namespace std
+{
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    class basic_stringbuf : public basic_streambuf<_CharT, _Traits>
+    {
+    public:
+      // Types:
+      typedef _CharT                                   char_type;
+      typedef _Traits                                  traits_type;
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+// 251. basic_stringbuf missing allocator_type
+      typedef _Alloc                                   allocator_type;
+#endif
+      typedef typename traits_type::int_type           int_type;
+      typedef typename traits_type::pos_type           pos_type;
+      typedef typename traits_type::off_type           off_type;
+
+      // Non-standard Types:
+      typedef basic_streambuf<char_type, traits_type>          __streambuf_type;
+      typedef basic_string<char_type, _Traits, _Alloc>         __string_type;
+      typedef typename __string_type::size_type                __size_type;
+
+    private:
+      // Data Members:
+      __string_type            _M_string;
+      
+    public:
+      // Constructors:
+      explicit 
+      basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out)
+      : __streambuf_type(), _M_string()
+      { _M_stringbuf_init(__mode); }
+
+      explicit 
+      basic_stringbuf(const __string_type& __str,
+                     ios_base::openmode __mode = ios_base::in | ios_base::out)
+      : __streambuf_type(), _M_string(__str.data(), __str.size())
+      { _M_stringbuf_init(__mode); }
+
+      // Get and set:
+      __string_type 
+      str() const 
+      {
+       if (_M_mode & ios_base::out)
+         {
+           // This is the deal: _M_string.size() is a value that
+           // represents the size of the initial string that makes
+           // _M_string, and may not be the correct size of the
+           // current stringbuf internal buffer.
+           __size_type __len = _M_string.size();
+           if (_M_out_cur > _M_out_beg)
+             __len = max(__size_type(_M_out_end - _M_out_beg), __len);
+           return __string_type(_M_out_beg, _M_out_beg + __len);
+         }
+       else
+         return _M_string;
+      }
+
+      void 
+      str(const __string_type& __s)
+      {
+       _M_string = __s;
+       _M_stringbuf_init(_M_mode);
+      }
+
+    protected:
+      // Common initialization code for both ctors goes here.
+      void
+      _M_stringbuf_init(ios_base::openmode __mode)
+      {
+       // _M_buf_size is a convenient alias for "what the streambuf
+       // thinks the allocated size of the string really is." This is
+       // necessary as ostringstreams are implemented with the
+       // streambufs having control of the allocation and
+       // re-allocation of the internal string object, _M_string.
+       _M_buf_size = _M_string.size();
+
+       // NB: Start ostringstream buffers at 512 bytes. This is an
+       // experimental value (pronounced "arbitrary" in some of the
+       // hipper english-speaking countries), and can be changed to
+       // suite particular needs.
+       _M_buf_size_opt = 512;
+       _M_mode = __mode;
+       if (_M_mode & ios_base::ate)
+         _M_really_sync(0, _M_buf_size); 
+       else  
+         _M_really_sync(0, 0);
+      }
+
+      // Overridden virtual functions:
+      virtual int_type 
+      underflow()
+      {
+       if (_M_in_cur && _M_in_cur < _M_in_end)
+         return traits_type::to_int_type(*gptr());
+       else
+         return traits_type::eof();
+      }
+
+      virtual int_type 
+      pbackfail(int_type __c = traits_type::eof());
+
+      virtual int_type 
+      overflow(int_type __c = traits_type::eof());
+
+      virtual __streambuf_type* 
+      setbuf(char_type* __s, streamsize __n)
+      { 
+       if (__s && __n) 
+         {
+           _M_string = __string_type(__s, __n);
+           _M_really_sync(0, 0);
+         }
+       return this; 
+      } 
+
+      virtual pos_type 
+      seekoff(off_type __off, ios_base::seekdir __way,
+             ios_base::openmode __mode = ios_base::in | ios_base::out);
+
+      virtual pos_type 
+      seekpos(pos_type __sp, 
+             ios_base::openmode __mode = ios_base::in | ios_base::out);
+
+      // Internal function for correctly updating the internal buffer
+      // for a particular _M_string, due to initialization or
+      // re-sizing of an existing _M_string.
+      // Assumes: contents of _M_string and internal buffer match exactly.
+      // __i == _M_in_cur - _M_in_beg      
+      // __o == _M_out_cur - _M_out_beg
+      virtual int 
+      _M_really_sync(__size_type __i, __size_type __o)
+      {
+       char_type* __base = const_cast<char_type*>(_M_string.data());
+       bool __testin = _M_mode & ios_base::in;
+       bool __testout = _M_mode & ios_base::out;
+       __size_type __len = _M_string.size();
+
+       _M_buf = __base;
+       if (__testin)
+           this->setg(__base, __base + __i, __base + __len);
+       if (__testout)
+         {
+           this->setp(__base, __base + __len);
+           _M_out_cur += __o;
+         }
+       return 0;
+      }
+    };
+
+
+  // 27.7.2  Template class basic_istringstream
+  template<typename _CharT, typename _Traits, typename _Alloc>
+    class basic_istringstream : public basic_istream<_CharT, _Traits>
+    {
+    public:
+      // Types:
+      typedef _CharT                                   char_type;
+      typedef _Traits                                  traits_type;
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+// 251. basic_stringbuf missing allocator_type
+      typedef _Alloc                                   allocator_type;
+#endif
+      typedef typename traits_type::int_type           int_type;
+      typedef typename traits_type::pos_type           pos_type;
+      typedef typename traits_type::off_type           off_type;
+
+      // Non-standard types:
+      typedef basic_string<_CharT, _Traits, _Alloc>    __string_type;
+      typedef basic_stringbuf<_CharT, _Traits, _Alloc>         __stringbuf_type;
+      typedef basic_istream<char_type, traits_type>    __istream_type;
+
+    private:
+      __stringbuf_type _M_stringbuf;
+
+    public:
+      // Constructors:
+      explicit 
+      basic_istringstream(ios_base::openmode __mode = ios_base::in)
+      : __istream_type(NULL), _M_stringbuf(__mode | ios_base::in)
+      { this->init(&_M_stringbuf); }
+
+      explicit 
+      basic_istringstream(const __string_type& __str,
+                         ios_base::openmode __mode = ios_base::in)
+      : __istream_type(NULL), _M_stringbuf(__str, __mode | ios_base::in)
+      { this->init(&_M_stringbuf); }
+
+      ~basic_istringstream()
+      { }
+
+      // Members:
+      __stringbuf_type* 
+      rdbuf() const
+      { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
+
+      __string_type
+      str() const
+      { return _M_stringbuf.str(); }
+  
+      void 
+      str(const __string_type& __s)
+      { _M_stringbuf.str(__s); }
+    };
+
+
+  // 27.7.3  Template class basic_ostringstream
+  template <typename _CharT, typename _Traits, typename _Alloc>
+    class basic_ostringstream : public basic_ostream<_CharT, _Traits>
+    {
+    public:
+      // Types:
+      typedef _CharT                                   char_type;
+      typedef _Traits                                  traits_type;
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+// 251. basic_stringbuf missing allocator_type
+      typedef _Alloc                                   allocator_type;
+#endif
+      typedef typename traits_type::int_type           int_type;
+      typedef typename traits_type::pos_type           pos_type;
+      typedef typename traits_type::off_type           off_type;
+
+      // Non-standard types:
+      typedef basic_string<_CharT, _Traits, _Alloc>    __string_type;
+      typedef basic_stringbuf<_CharT, _Traits, _Alloc>         __stringbuf_type;
+      typedef basic_ostream<char_type, traits_type>    __ostream_type;
+
+    private:
+      __stringbuf_type _M_stringbuf;
+
+    public:
+     // Constructors/destructor:
+      explicit 
+      basic_ostringstream(ios_base::openmode __mode = ios_base::out)
+      : __ostream_type(NULL), _M_stringbuf(__mode | ios_base::out)
+      { this->init(&_M_stringbuf); }
+
+      explicit 
+      basic_ostringstream(const __string_type& __str,
+                         ios_base::openmode __mode = ios_base::out)
+      : __ostream_type(NULL), _M_stringbuf(__str, __mode | ios_base::out)
+      { this->init(&_M_stringbuf); }
+
+      ~basic_ostringstream()
+      { }
+
+      // Members:
+      __stringbuf_type* 
+      rdbuf() const
+      { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
+
+      __string_type
+      str() const
+      { return _M_stringbuf.str(); }
+      void 
+      str(const __string_type& __s)
+      { _M_stringbuf.str(__s); }
+    };
+  
+  
+  // 27.7.4  Template class basic_stringstream
+  template <typename _CharT, typename _Traits, typename _Alloc>
+    class basic_stringstream : public basic_iostream<_CharT, _Traits>
+    {
+    public:
+      // Types:
+      typedef _CharT                                   char_type;
+      typedef _Traits                                  traits_type;
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+// 251. basic_stringbuf missing allocator_type
+      typedef _Alloc                                   allocator_type;
+#endif
+      typedef typename traits_type::int_type           int_type;
+      typedef typename traits_type::pos_type           pos_type;
+      typedef typename traits_type::off_type           off_type;
+
+      // Non-standard Types:
+      typedef basic_string<_CharT, _Traits, _Alloc>    __string_type;
+      typedef basic_stringbuf<_CharT, _Traits, _Alloc>         __stringbuf_type;
+      typedef basic_iostream<char_type, traits_type>   __iostream_type;
+
+    private:
+      __stringbuf_type _M_stringbuf;
+
+    public:
+      // Constructors/destructors
+      explicit 
+      basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in)
+      : __iostream_type(NULL), _M_stringbuf(__m)
+      { this->init(&_M_stringbuf); }
+
+      explicit 
+      basic_stringstream(const __string_type& __str,
+                        ios_base::openmode __m = ios_base::out | ios_base::in)
+      : __iostream_type(NULL), _M_stringbuf(__str, __m)
+      { this->init(&_M_stringbuf); }
+
+      ~basic_stringstream()
+      { }
+
+      // Members:
+      __stringbuf_type* 
+      rdbuf() const
+      { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
+
+      __string_type
+      str() const
+      { return _M_stringbuf.str(); }
+
+      void 
+      str(const __string_type& __s)
+      { _M_stringbuf.str(__s); }
+    };
+} // namespace std
+
+
+
+#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
+# define export
+#ifdef  _GLIBCPP_FULLY_COMPLIANT_HEADERS
+# include <bits/sstream.tcc>
+#endif
+#endif
+
+#endif // _CPP_SSTREAM
diff --git a/libstdc++-v3/include/std/std_stack.h b/libstdc++-v3/include/std/std_stack.h
new file mode 100644 (file)
index 0000000..166f428
--- /dev/null
@@ -0,0 +1,77 @@
+// <stack> -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file std_stack.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_STACK
+#define _CPP_STACK 1
+
+#pragma GCC system_header
+
+#include <bits/stl_algobase.h>
+#include <bits/stl_alloc.h>
+#include <bits/stl_construct.h>
+#include <bits/stl_uninitialized.h>
+#include <bits/stl_deque.h>
+#include <bits/stl_stack.h>
+
+#endif /* _CPP_STACK */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/libstdc++-v3/include/std/std_stdexcept.h b/libstdc++-v3/include/std/std_stdexcept.h
new file mode 100644 (file)
index 0000000..66bac50
--- /dev/null
@@ -0,0 +1,150 @@
+// Standard exception classes  -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 19.1  Exception classes
+//
+
+/** @file std_stdexcept.h
+ *  The Standard C++ library provides classes to be used to report certain
+ *  errors (17.4.4.8) in C++ programs.  In the error model reflected in these
+ *  classes, errors are divided into two broad categories: logic errors and
+ *  runtime errors.
+ */
+
+#ifndef _CPP_STDEXCEPT
+#define _CPP_STDEXCEPT           1
+
+#pragma GCC system_header
+
+#include <exception>
+#include <string>
+
+namespace std 
+{
+  /** Logic errors represent problems in the internal logic of a program;
+   *  in theory, these are preventable, and even detectable before the
+   *  program runs (e.g., violations of class invariants).
+   *  @brief One of two subclasses of exception.
+   */
+  class logic_error : public exception 
+  {
+    string _M_msg;
+
+  public:
+    /** Takes a character string describing the error.  */
+    explicit 
+    logic_error(const string&  __arg);
+
+    virtual 
+    ~logic_error() throw();
+
+    /** Returns a C-style character string describing the general cause of
+     *  the current error (the same string passed to the ctor).  */
+    virtual const char* 
+    what() const throw();
+  };
+
+  /** Thrown by the library, or by you, to report domain errors (domain in
+   *  the mathmatical sense).  */
+  class domain_error : public logic_error 
+  {
+  public:
+    explicit domain_error(const string&  __arg);
+  };
+
+  /** Thrown to report invalid arguments to functions.  */
+  class invalid_argument : public logic_error 
+  {
+  public:
+    explicit invalid_argument(const string&  __arg);
+  };
+
+  /** Thrown when an object is constructed that would exceed its maximum
+   *  permitted size (e.g., a basic_string instance).  */
+  class length_error : public logic_error 
+  {
+  public:
+    explicit length_error(const string&  __arg);
+  };
+
+  /** This represents an argument whose value is not within the expected
+   *  range (e.g., boundary checks in basic_string).  */
+  class out_of_range : public logic_error 
+  {
+  public:
+    explicit out_of_range(const string&  __arg);
+  };
+
+  /** Runtime errors represent problems outside the scope of a program;
+   *  they cannot be easily predicted and can generally only be caught as
+   *  the program executes.
+   *  @brief One of two subclasses of exception.
+   */
+  class runtime_error : public exception 
+  {
+    string _M_msg;
+
+  public:
+    /** Takes a character string describing the error.  */
+    explicit 
+    runtime_error(const string&  __arg);
+
+    virtual 
+    ~runtime_error() throw();
+
+    /** Returns a C-style character string describing the general cause of
+     *  the current error (the same string passed to the ctor).  */
+    virtual const char* 
+    what() const throw();
+  };
+
+  /** Thrown to indicate range errors in internal computations.  */
+  class range_error : public runtime_error 
+  {
+  public:
+    explicit range_error(const string&  __arg);
+  };
+
+  /** Thrown to indicate arithmetic overflow.  */
+  class overflow_error : public runtime_error 
+  {
+  public:
+    explicit overflow_error(const string&  __arg);
+  };
+
+  /** Thrown to indicate arithmetic underflow.  */
+  class underflow_error : public runtime_error 
+  {
+  public:
+    explicit underflow_error(const string&  __arg);
+  };
+} // namespace std
+
+#endif // _CPP_STDEXCEPT
diff --git a/libstdc++-v3/include/std/std_streambuf.h b/libstdc++-v3/include/std/std_streambuf.h
new file mode 100644 (file)
index 0000000..59f7070
--- /dev/null
@@ -0,0 +1,540 @@
+// Stream buffer classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.5  Stream buffers
+//
+
+/** @file std_streambuf.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_STREAMBUF
+#define _CPP_STREAMBUF 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <iosfwd>
+#include <cstdio>      // For SEEK_SET, SEEK_CUR, SEEK_END
+#include <bits/localefwd.h>
+#include <bits/ios_base.h>
+
+namespace std
+{
+  template<typename _CharT, typename _Traits>
+    streamsize
+    __copy_streambufs(basic_ios<_CharT, _Traits>& _ios,
+                     basic_streambuf<_CharT, _Traits>* __sbin,
+                     basic_streambuf<_CharT, _Traits>* __sbout);
+  
+  // 27.5.2 Template class basic_streambuf<_CharT, _Traits>
+  template<typename _CharT, typename _Traits>
+    class basic_streambuf 
+    {
+    public:
+      // Types:
+      typedef _CharT                                   char_type;
+      typedef _Traits                                  traits_type;
+      typedef typename traits_type::int_type           int_type;
+      typedef typename traits_type::pos_type           pos_type;
+      typedef typename traits_type::off_type           off_type;
+
+      // Non-standard Types:
+      typedef ctype<char_type>                         __ctype_type;
+      typedef basic_streambuf<char_type, traits_type>          __streambuf_type;
+      
+      friend class basic_ios<char_type, traits_type>;
+      friend class basic_istream<char_type, traits_type>;
+      friend class basic_ostream<char_type, traits_type>;
+      friend class istreambuf_iterator<char_type, traits_type>;
+      friend class ostreambuf_iterator<char_type, traits_type>;
+
+      friend streamsize
+      __copy_streambufs<>(basic_ios<char_type, traits_type>& __ios,
+                         __streambuf_type* __sbin,__streambuf_type* __sbout);
+      
+    protected:
+
+      // Pointer to the beginning of internally-allocated
+      // space. Filebuf manually allocates/deallocates this, whereas
+      // stringstreams attempt to use the built-in intelligence of the
+      // string class. If you are managing memory, set this. If not,
+      // leave it NULL.
+      char_type*               _M_buf;         
+
+      // Actual size of allocated internal buffer, in bytes.
+      int_type                 _M_buf_size;
+
+      // Optimal or preferred size of internal buffer, in bytes.
+      int_type                 _M_buf_size_opt;
+
+      // True iff _M_in_* and _M_out_* buffers should always point to
+      // the same place.  True for fstreams, false for sstreams.
+      bool                     _M_buf_unified; 
+
+      // This is based on _IO_FILE, just reordered to be more
+      // consistent, and is intended to be the most minimal abstraction
+      // for an internal buffer.
+      // get == input == read
+      // put == output == write
+      char_type*               _M_in_beg;      // Start of get area. 
+      char_type*               _M_in_cur;      // Current read area. 
+      char_type*               _M_in_end;      // End of get area. 
+      char_type*               _M_out_beg;     // Start of put area. 
+      char_type*               _M_out_cur;     // Current put area. 
+      char_type*               _M_out_end;     // End of put area. 
+
+      // Place to stash in || out || in | out settings for current streambuf.
+      ios_base::openmode       _M_mode;        
+
+      // Current locale setting.
+      locale                   _M_buf_locale;  
+
+      // True iff locale is initialized.
+      bool                     _M_buf_locale_init;
+
+      // Necessary bits for putback buffer management. Only used in
+      // the basic_filebuf class, as necessary for the standard
+      // requirements. The only basic_streambuf member function that
+      // needs access to these data members is in_avail...
+      // NB: pbacks of over one character are not currently supported.
+      int_type                 _M_pback_size; 
+      char_type*               _M_pback; 
+      char_type*               _M_pback_cur_save;
+      char_type*               _M_pback_end_save;
+      bool                     _M_pback_init; 
+
+      // Initializes pback buffers, and moves normal buffers to safety.
+      // Assumptions:
+      // _M_in_cur has already been moved back
+      void
+      _M_pback_create()
+      {
+       if (!_M_pback_init)
+         {
+           int_type __dist = _M_in_end - _M_in_cur;
+           int_type __len = min(_M_pback_size, __dist);
+           traits_type::copy(_M_pback, _M_in_cur, __len);
+           _M_pback_cur_save = _M_in_cur;
+           _M_pback_end_save = _M_in_end;
+           this->setg(_M_pback, _M_pback, _M_pback + __len);
+           _M_pback_init = true;
+         }
+      }
+
+      // Deactivates pback buffer contents, and restores normal buffer.
+      // Assumptions:
+      // The pback buffer has only moved forward.
+      void
+      _M_pback_destroy()
+      {
+       if (_M_pback_init)
+         {
+           // Length _M_in_cur moved in the pback buffer.
+           int_type __off_cur = _M_in_cur - _M_pback;
+           
+           // For in | out buffers, the end can be pushed back...
+           int_type __off_end = 0;
+           int_type __pback_len = _M_in_end - _M_pback;
+           int_type __save_len = _M_pback_end_save - _M_buf;
+           if (__pback_len > __save_len)
+             __off_end = __pback_len - __save_len;
+
+           this->setg(_M_buf, _M_pback_cur_save + __off_cur, 
+                      _M_pback_end_save + __off_end);
+           _M_pback_cur_save = NULL;
+           _M_pback_end_save = NULL;
+           _M_pback_init = false;
+         }
+      }
+
+      // Correctly sets the _M_in_cur pointer, and bumps the
+      // _M_out_cur pointer as well if necessary.
+      void 
+      _M_in_cur_move(off_type __n) // argument needs to be +-
+      {
+       bool __testout = _M_out_cur;
+       _M_in_cur += __n;
+       if (__testout && _M_buf_unified)
+         _M_out_cur += __n;
+      }
+
+      // Correctly sets the _M_out_cur pointer, and bumps the
+      // appropriate _M_*_end pointers as well. Necessary for the
+      // un-tied stringbufs, in in|out mode.
+      // Invariant:
+      // __n + _M_out_[cur, end] <= _M_buf + _M_buf_size
+      // Assuming all _M_*_[beg, cur, end] pointers are operating on
+      // the same range:
+      // _M_buf <= _M_*_ <= _M_buf + _M_buf_size
+      void 
+      _M_out_cur_move(off_type __n) // argument needs to be +-
+      {
+       bool __testin = _M_in_cur;
+
+       _M_out_cur += __n;
+       if (__testin && _M_buf_unified)
+         _M_in_cur += __n;
+       if (_M_out_cur > _M_out_end)
+         {
+           _M_out_end = _M_out_cur;
+           // NB: in | out buffers drag the _M_in_end pointer along...
+           if (__testin)
+             _M_in_end += __n;
+         }
+      }
+
+      // Return the size of the output buffer.  This depends on the
+      // buffer in use: allocated buffers have a stored size in
+      // _M_buf_size and setbuf() buffers don't.
+      off_type
+      _M_out_buf_size()
+      {
+       off_type __ret = 0;
+       if (_M_out_cur)
+         {
+           // Using allocated buffer.
+           if (_M_out_beg == _M_buf)
+             __ret = _M_out_beg + _M_buf_size - _M_out_cur;
+           // Using non-allocated buffer.
+           else
+             __ret = _M_out_end - _M_out_cur;
+         }
+       return __ret;
+      }
+
+      // These three functions are used to clarify internal buffer
+      // maintenance. After an overflow, or after a seekoff call that
+      // started at beg or end, or possibly when the stream becomes
+      // unbuffered, and a myrid other obscure corner cases, the
+      // internal buffer does not truly reflect the contents of the
+      // external buffer. At this point, for whatever reason, it is in
+      // an indeterminate state.
+      void
+      _M_set_indeterminate(void)
+      {
+       if (_M_mode & ios_base::in)
+         this->setg(_M_buf, _M_buf, _M_buf);
+       if (_M_mode & ios_base::out)
+         this->setp(_M_buf, _M_buf);
+      }
+
+      void
+      _M_set_determinate(off_type __off)
+      {
+       bool __testin = _M_mode & ios_base::in;
+       bool __testout = _M_mode & ios_base::out;
+       if (__testin)
+         this->setg(_M_buf, _M_buf, _M_buf + __off);
+       if (__testout)
+         this->setp(_M_buf, _M_buf + __off);
+      }
+
+      bool
+      _M_is_indeterminate(void)
+      { 
+       bool __ret = false;
+       // Don't return true if unbuffered.
+       if (_M_buf)
+         {
+           if (_M_mode & ios_base::in)
+             __ret = _M_in_beg == _M_in_cur && _M_in_cur == _M_in_end;
+           if (_M_mode & ios_base::out)
+             __ret = _M_out_beg == _M_out_cur && _M_out_cur == _M_out_end;
+         }
+       return __ret;
+      }
+
+  public:
+      virtual 
+      ~basic_streambuf() 
+      {
+       _M_buf_unified = false;
+       _M_buf_size = 0;
+       _M_buf_size_opt = 0;
+       _M_mode = ios_base::openmode(0);
+       _M_buf_locale_init = false;
+      }
+
+      // Locales:
+      locale 
+      pubimbue(const locale &__loc)
+      {
+       locale __tmp(this->getloc());
+       this->imbue(__loc);
+       return __tmp;
+      }
+
+      locale   
+      getloc() const
+      {
+       if (_M_buf_locale_init)
+         return _M_buf_locale; 
+       else 
+         return locale();
+      } 
+
+      // Buffer and positioning:
+      __streambuf_type* 
+      pubsetbuf(char_type* __s, streamsize __n) 
+      { return this->setbuf(__s, __n); }
+
+      pos_type 
+      pubseekoff(off_type __off, ios_base::seekdir __way, 
+                ios_base::openmode __mode = ios_base::in | ios_base::out)
+      { return this->seekoff(__off, __way, __mode); }
+
+      pos_type 
+      pubseekpos(pos_type __sp,
+                ios_base::openmode __mode = ios_base::in | ios_base::out)
+      { return this->seekpos(__sp, __mode); }
+
+      int 
+      pubsync() { return this->sync(); }
+
+      // Get and put areas:
+      // Get area:
+      streamsize 
+      in_avail() 
+      { 
+       streamsize __ret;
+       if (_M_in_cur && _M_in_cur < _M_in_end)
+         {
+           if (_M_pback_init)
+             {
+               int_type __save_len =  _M_pback_end_save - _M_pback_cur_save;
+               int_type __pback_len = _M_in_cur - _M_pback;
+               __ret = __save_len - __pback_len;
+             }
+           else
+             __ret = this->egptr() - this->gptr();
+         }
+       else
+         __ret = this->showmanyc();
+       return __ret;
+      }
+
+      int_type 
+      snextc()
+      {
+       int_type __eof = traits_type::eof();
+       return (this->sbumpc() == __eof ? __eof : this->sgetc()); 
+      }
+
+      int_type 
+      sbumpc();
+
+      int_type 
+      sgetc()
+      {
+       int_type __ret;
+       if (_M_in_cur && _M_in_cur < _M_in_end)
+         __ret = traits_type::to_int_type(*(this->gptr()));
+       else 
+         __ret = this->underflow();
+       return __ret;
+      }
+
+      streamsize 
+      sgetn(char_type* __s, streamsize __n)
+      { return this->xsgetn(__s, __n); }
+
+      // Putback:
+      int_type 
+      sputbackc(char_type __c);
+
+      int_type 
+      sungetc();
+
+      // Put area:
+      int_type 
+      sputc(char_type __c);
+
+      streamsize 
+      sputn(const char_type* __s, streamsize __n)
+      { return this->xsputn(__s, __n); }
+
+    protected:
+      basic_streambuf()
+      : _M_buf(NULL), _M_buf_size(0), 
+      _M_buf_size_opt(static_cast<int_type>(BUFSIZ)), _M_buf_unified(false), 
+      _M_in_beg(0), _M_in_cur(0), _M_in_end(0), _M_out_beg(0), _M_out_cur(0), 
+      _M_out_end(0), _M_mode(ios_base::openmode(0)), _M_buf_locale(locale()), 
+      _M_buf_locale_init(false), _M_pback_size(1), _M_pback(NULL), 
+      _M_pback_cur_save(NULL), _M_pback_end_save(NULL), _M_pback_init(false)
+      { }
+
+      // Get area:
+      char_type* 
+      eback() const { return _M_in_beg; }
+
+      char_type* 
+      gptr()  const { return _M_in_cur;  }
+
+      char_type* 
+      egptr() const { return _M_in_end; }
+
+      void 
+      gbump(int __n) { _M_in_cur += __n; }
+
+      void 
+      setg(char_type* __gbeg, char_type* __gnext, char_type* __gend)
+      {
+       _M_in_beg = __gbeg;
+       _M_in_cur = __gnext;
+       _M_in_end = __gend;
+       if (!(_M_mode & ios_base::in) && __gbeg && __gnext && __gend)
+         _M_mode = _M_mode | ios_base::in;
+      }
+
+      // Put area:
+      char_type* 
+      pbase() const { return _M_out_beg; }
+
+      char_type* 
+      pptr() const { return _M_out_cur; }
+
+      char_type* 
+      epptr() const { return _M_out_end; }
+
+      void 
+      pbump(int __n) { _M_out_cur += __n; }
+
+      void 
+      setp(char_type* __pbeg, char_type* __pend)
+      { 
+       _M_out_beg = _M_out_cur = __pbeg; 
+       _M_out_end = __pend; 
+       if (!(_M_mode & ios_base::out) && __pbeg && __pend)
+         _M_mode = _M_mode | ios_base::out;
+      }
+
+      // Virtual functions:
+      // Locales:
+      virtual void 
+      imbue(const locale& __loc) 
+      { 
+       _M_buf_locale_init = true;
+       if (_M_buf_locale != __loc)
+         _M_buf_locale = __loc;
+      }
+
+      // Buffer management and positioning:
+      virtual basic_streambuf<char_type,_Traits>* 
+      setbuf(char_type*, streamsize)
+      {        return this; }
+      
+      virtual pos_type 
+      seekoff(off_type, ios_base::seekdir,
+             ios_base::openmode /*__mode*/ = ios_base::in | ios_base::out)
+      { return pos_type(off_type(-1)); } 
+
+      virtual pos_type 
+      seekpos(pos_type, 
+             ios_base::openmode /*__mode*/ = ios_base::in | ios_base::out)
+      { return pos_type(off_type(-1)); } 
+
+      virtual int 
+      sync() { return 0; }
+
+      // Get area:
+      virtual streamsize 
+      showmanyc() { return 0; }
+
+      virtual streamsize 
+      xsgetn(char_type* __s, streamsize __n);
+
+      virtual int_type 
+      underflow()
+      { return traits_type::eof(); }
+
+      virtual int_type 
+      uflow() 
+      {
+       int_type __ret = traits_type::eof();
+       bool __testeof = this->underflow() == __ret;
+       bool __testpending = _M_in_cur && _M_in_cur < _M_in_end;
+       if (!__testeof && __testpending)
+         {
+           __ret = traits_type::to_int_type(*_M_in_cur);
+           ++_M_in_cur;
+           if (_M_buf_unified && _M_mode & ios_base::out)
+             ++_M_out_cur;
+         }
+       return __ret;    
+      }
+
+      // Putback:
+      virtual int_type 
+      pbackfail(int_type /* __c */  = traits_type::eof())
+      { return traits_type::eof(); }
+
+      // Put area:
+      virtual streamsize 
+      xsputn(const char_type* __s, streamsize __n);
+
+      virtual int_type 
+      overflow(int_type /* __c */ = traits_type::eof())
+      { return traits_type::eof(); }
+
+#ifdef _GLIBCPP_DEPRECATED
+    public:
+      void 
+      stossc() 
+      {
+       if (_M_in_cur < _M_in_end) 
+         ++_M_in_cur;
+       else 
+         this->uflow();
+      }
+#endif
+
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+    // Side effect of DR 50.
+    private:
+      basic_streambuf(const __streambuf_type&);
+
+      __streambuf_type& 
+      operator=(const __streambuf_type&);
+#endif
+    };
+
+} // namespace std
+
+#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
+# define export
+#ifdef  _GLIBCPP_FULLY_COMPLIANT_HEADERS
+#include <bits/streambuf.tcc>
+#endif
+#endif
+
+#endif /* _CPP_STREAMBUF */
+
diff --git a/libstdc++-v3/include/std/std_string.h b/libstdc++-v3/include/std/std_string.h
new file mode 100644 (file)
index 0000000..9cdc533
--- /dev/null
@@ -0,0 +1,60 @@
+// Components for manipulating sequences of characters -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 21  Strings library
+//
+
+/** @file std_string.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_STRING
+#define _CPP_STRING    1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/stringfwd.h>
+#include <bits/char_traits.h>
+#include <memory>      // For allocator.
+#include <bits/type_traits.h>
+#include <iosfwd>      // For operators >>, <<, and getline decls.
+#include <bits/stl_iterator.h>
+#include <bits/stl_function.h>  // For less
+#include <bits/basic_string.h>
+
+#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
+# include <algorithm> // for find_if
+# include <bits/basic_string.tcc> 
+#endif
+
+#endif /* _CPP_STRING */
+
diff --git a/libstdc++-v3/include/std/std_utility.h b/libstdc++-v3/include/std/std_utility.h
new file mode 100644 (file)
index 0000000..5917c83
--- /dev/null
@@ -0,0 +1,73 @@
+// <utility> -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file std_utility.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_UTILITY
+#define _CPP_UTILITY 1
+
+#pragma GCC system_header
+#include <bits/c++config.h>
+#include <bits/stl_relops.h>
+#include <bits/stl_pair.h>
+
+#endif /* _CPP_UTILITY */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/libstdc++-v3/include/std/std_valarray.h b/libstdc++-v3/include/std/std_valarray.h
new file mode 100644 (file)
index 0000000..a354708
--- /dev/null
@@ -0,0 +1,742 @@
+// The template and inlines for the -*- C++ -*- valarray class.
+
+// Copyright (C) 1997-1999, 2000, 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
+
+/** @file std_valarray.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_VALARRAY
+#define _CPP_VALARRAY 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <cstddef>
+#include <cmath>
+#include <cstdlib>
+#include <numeric>
+#include <functional>
+#include <algorithm>
+
+namespace std
+{
+    template<class _Clos, typename _Tp> class _Expr;
+
+    template<typename _Tp1, typename _Tp2> class _ValArray;    
+
+    template<template<class> class _Oper,
+        template<class, class> class _Meta, class _Dom> struct _UnClos;
+
+    template<template<class> class _Oper,
+        template<class, class> class _Meta1,
+        template<class, class> class _Meta2,
+        class _Dom1, class _Dom2> class _BinClos;
+
+    template<template<class, class> class _Meta, class _Dom> class _SClos;
+
+    template<template<class, class> class _Meta, class _Dom> class _GClos;
+    
+    template<template<class, class> class _Meta, class _Dom> class _IClos;
+    
+    template<template<class, class> class _Meta, class _Dom> class _ValFunClos;
+
+    template<template<class, class> class _Meta, class _Dom> class _RefFunClos;
+
+    template<class _Tp> struct _Unary_plus;
+    template<class _Tp> struct _Bitwise_and;
+    template<class _Tp> struct _Bitwise_or;
+    template<class _Tp> struct _Bitwise_xor;  
+    template<class _Tp> struct _Bitwise_not;
+    template<class _Tp> struct _Shift_left;
+    template<class _Tp> struct _Shift_right;
+  
+    template<class _Tp> class valarray;   // An array of type _Tp
+    class slice;                          // BLAS-like slice out of an array
+    template<class _Tp> class slice_array;
+    class gslice;                         // generalized slice out of an array
+    template<class _Tp> class gslice_array;
+    template<class _Tp> class mask_array;     // masked array
+    template<class _Tp> class indirect_array; // indirected array
+
+} // namespace std
+
+#include <bits/valarray_array.h>
+#include <bits/valarray_meta.h>
+  
+namespace std
+{
+  template<class _Tp> class valarray
+  {
+  public:
+      typedef _Tp value_type;
+
+      // _lib.valarray.cons_ construct/destroy:
+      valarray();
+      explicit valarray(size_t);
+      valarray(const _Tp&, size_t);
+      valarray(const _Tp* __restrict__, size_t);
+      valarray(const valarray&);
+      valarray(const slice_array<_Tp>&);
+      valarray(const gslice_array<_Tp>&);
+      valarray(const mask_array<_Tp>&);
+      valarray(const indirect_array<_Tp>&);
+      template<class _Dom>
+      valarray(const _Expr<_Dom,_Tp>& __e);
+     ~valarray();
+
+      // _lib.valarray.assign_ assignment:
+      valarray<_Tp>& operator=(const valarray<_Tp>&);
+      valarray<_Tp>& operator=(const _Tp&);
+      valarray<_Tp>& operator=(const slice_array<_Tp>&);
+      valarray<_Tp>& operator=(const gslice_array<_Tp>&);
+      valarray<_Tp>& operator=(const mask_array<_Tp>&);
+      valarray<_Tp>& operator=(const indirect_array<_Tp>&);
+
+      template<class _Dom> valarray<_Tp>&
+       operator= (const _Expr<_Dom,_Tp>&);
+
+      // _lib.valarray.access_ element access:
+      // XXX: LWG to be resolved.
+      const _Tp&                 operator[](size_t) const;
+      _Tp&                operator[](size_t);          
+      // _lib.valarray.sub_ subset operations:
+      _Expr<_SClos<_ValArray,_Tp>, _Tp> operator[](slice) const;
+      slice_array<_Tp>    operator[](slice);
+      _Expr<_GClos<_ValArray,_Tp>, _Tp> operator[](const gslice&) const;
+      gslice_array<_Tp>   operator[](const gslice&);
+      valarray<_Tp>             operator[](const valarray<bool>&) const;
+      mask_array<_Tp>     operator[](const valarray<bool>&);
+      _Expr<_IClos<_ValArray, _Tp>, _Tp>
+       operator[](const valarray<size_t>&) const;
+      indirect_array<_Tp> operator[](const valarray<size_t>&);
+
+      // _lib.valarray.unary_ unary operators:
+      _Expr<_UnClos<_Unary_plus,_ValArray,_Tp>,_Tp>  operator+ () const;
+      _Expr<_UnClos<negate,_ValArray,_Tp>,_Tp> operator- () const;
+      _Expr<_UnClos<_Bitwise_not,_ValArray,_Tp>,_Tp> operator~ () const;
+      _Expr<_UnClos<logical_not,_ValArray,_Tp>,bool> operator! () const;
+      
+      // _lib.valarray.cassign_ computed assignment:
+      valarray<_Tp>& operator*= (const _Tp&);
+      valarray<_Tp>& operator/= (const _Tp&);
+      valarray<_Tp>& operator%= (const _Tp&);
+      valarray<_Tp>& operator+= (const _Tp&);
+      valarray<_Tp>& operator-= (const _Tp&);
+      valarray<_Tp>& operator^= (const _Tp&);
+      valarray<_Tp>& operator&= (const _Tp&);
+      valarray<_Tp>& operator|= (const _Tp&);
+      valarray<_Tp>& operator<<=(const _Tp&);
+      valarray<_Tp>& operator>>=(const _Tp&);
+      valarray<_Tp>& operator*= (const valarray<_Tp>&);
+      valarray<_Tp>& operator/= (const valarray<_Tp>&);
+      valarray<_Tp>& operator%= (const valarray<_Tp>&);
+      valarray<_Tp>& operator+= (const valarray<_Tp>&);
+      valarray<_Tp>& operator-= (const valarray<_Tp>&);
+      valarray<_Tp>& operator^= (const valarray<_Tp>&);
+      valarray<_Tp>& operator|= (const valarray<_Tp>&);
+      valarray<_Tp>& operator&= (const valarray<_Tp>&);
+      valarray<_Tp>& operator<<=(const valarray<_Tp>&);
+      valarray<_Tp>& operator>>=(const valarray<_Tp>&);
+
+      template<class _Dom>
+        valarray<_Tp>& operator*= (const _Expr<_Dom,_Tp>&);
+      template<class _Dom>
+        valarray<_Tp>& operator/= (const _Expr<_Dom,_Tp>&);
+      template<class _Dom>
+        valarray<_Tp>& operator%= (const _Expr<_Dom,_Tp>&);
+      template<class _Dom>
+        valarray<_Tp>& operator+= (const _Expr<_Dom,_Tp>&);
+      template<class _Dom>
+        valarray<_Tp>& operator-= (const _Expr<_Dom,_Tp>&);
+      template<class _Dom>
+        valarray<_Tp>& operator^= (const _Expr<_Dom,_Tp>&);
+      template<class _Dom>
+        valarray<_Tp>& operator|= (const _Expr<_Dom,_Tp>&);
+      template<class _Dom>
+        valarray<_Tp>& operator&= (const _Expr<_Dom,_Tp>&);
+      template<class _Dom>
+        valarray<_Tp>& operator<<=(const _Expr<_Dom,_Tp>&);
+      template<class _Dom>
+        valarray<_Tp>& operator>>=(const _Expr<_Dom,_Tp>&);
+
+      
+      // _lib.valarray.members_ member functions:
+      size_t size() const;
+      _Tp    sum() const;      
+      _Tp    min() const;      
+      _Tp    max() const;      
+
+//           // FIXME: Extension
+//       _Tp    product () const;
+
+      valarray<_Tp> shift (int) const;
+      valarray<_Tp> cshift(int) const;
+      _Expr<_ValFunClos<_ValArray,_Tp>,_Tp> apply(_Tp func(_Tp)) const;
+      _Expr<_RefFunClos<_ValArray,_Tp>,_Tp> apply(_Tp func(const _Tp&)) const;
+      void resize(size_t __size, _Tp __c = _Tp());
+
+  private:
+      size_t _M_size;
+      _Tp* __restrict__ _M_data;
+
+      friend class _Array<_Tp>;
+  };
+
+
+  template<typename _Tp> struct _Unary_plus : unary_function<_Tp,_Tp> {
+      _Tp operator() (const _Tp& __t) const { return __t; }
+  };
+
+  template<typename _Tp> struct _Bitwise_and : binary_function<_Tp,_Tp,_Tp> {
+      _Tp operator() (_Tp __x, _Tp __y) const { return __x & __y; }
+  };
+
+  template<typename _Tp> struct _Bitwise_or : binary_function<_Tp,_Tp,_Tp> {
+      _Tp operator() (_Tp __x, _Tp __y) const { return __x | __y; }
+  };
+
+  template<typename _Tp> struct _Bitwise_xor : binary_function<_Tp,_Tp,_Tp> {
+      _Tp operator() (_Tp __x, _Tp __y) const { return __x ^ __y; }
+  };
+  
+  template<typename _Tp> struct _Bitwise_not : unary_function<_Tp,_Tp> {
+      _Tp operator() (_Tp __t) const { return ~__t; }
+  };
+
+  template<typename _Tp> struct _Shift_left : unary_function<_Tp,_Tp> {
+      _Tp operator() (_Tp __x, _Tp __y) const { return __x << __y; }
+  };
+
+  template<typename _Tp> struct _Shift_right : unary_function<_Tp,_Tp> {
+      _Tp operator() (_Tp __x, _Tp __y) const { return __x >> __y; }
+  };
+
+  
+  template<typename _Tp>
+  inline const _Tp&
+  valarray<_Tp>::operator[] (size_t __i) const
+  { return _M_data[__i]; }
+
+  template<typename _Tp>
+  inline _Tp&
+  valarray<_Tp>::operator[] (size_t __i)
+  { return _M_data[__i]; }
+
+} // std::
+      
+#include <bits/slice.h>
+#include <bits/slice_array.h>
+#include <bits/gslice.h>
+#include <bits/gslice_array.h>
+#include <bits/mask_array.h>
+#include <bits/indirect_array.h>
+
+namespace std
+{
+  template<typename _Tp>
+  inline valarray<_Tp>::valarray () : _M_size (0), _M_data (0) {}
+
+  template<typename _Tp>
+  inline valarray<_Tp>::valarray (size_t __n) 
+      : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
+  { __valarray_default_construct(_M_data, _M_data + __n); }
+
+  template<typename _Tp>
+  inline valarray<_Tp>::valarray (const _Tp& __t, size_t __n)
+    : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
+  { __valarray_fill_construct (_M_data, _M_data + __n, __t); }
+
+  template<typename _Tp>
+  inline valarray<_Tp>::valarray (const _Tp* __restrict__ __p, size_t __n)
+    : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
+  { __valarray_copy_construct (__p, __p + __n, _M_data); }
+
+  template<typename _Tp>
+  inline valarray<_Tp>::valarray (const valarray<_Tp>& __v)
+    : _M_size(__v._M_size), _M_data(__valarray_get_storage<_Tp>(__v._M_size))
+  { __valarray_copy_construct (__v._M_data, __v._M_data + _M_size, _M_data); }
+
+  template<typename _Tp>
+  inline valarray<_Tp>::valarray (const slice_array<_Tp>& __sa)
+    : _M_size(__sa._M_sz), _M_data(__valarray_get_storage<_Tp>(__sa._M_sz))
+  {
+    __valarray_copy
+      (__sa._M_array, __sa._M_sz, __sa._M_stride, _Array<_Tp>(_M_data));
+  }
+
+  template<typename _Tp>
+  inline valarray<_Tp>::valarray (const gslice_array<_Tp>& __ga)
+    : _M_size(__ga._M_index.size()),
+      _M_data(__valarray_get_storage<_Tp>(_M_size))
+  {
+    __valarray_copy
+      (__ga._M_array, _Array<size_t>(__ga._M_index),
+       _Array<_Tp>(_M_data), _M_size);
+  }
+
+  template<typename _Tp>
+  inline valarray<_Tp>::valarray (const mask_array<_Tp>& __ma)
+    : _M_size(__ma._M_sz), _M_data(__valarray_get_storage<_Tp>(__ma._M_sz))
+  {
+    __valarray_copy
+      (__ma._M_array, __ma._M_mask, _Array<_Tp>(_M_data), _M_size);
+  }
+
+  template<typename _Tp>
+  inline valarray<_Tp>::valarray (const indirect_array<_Tp>& __ia)
+    : _M_size(__ia._M_sz), _M_data(__valarray_get_storage<_Tp>(__ia._M_sz))
+  {
+    __valarray_copy
+      (__ia._M_array, __ia._M_index, _Array<_Tp>(_M_data), _M_size);
+  }
+
+  template<typename _Tp> template<class _Dom>
+  inline valarray<_Tp>::valarray (const _Expr<_Dom, _Tp>& __e)
+    : _M_size(__e.size ()), _M_data(__valarray_get_storage<_Tp>(_M_size))
+  { __valarray_copy (__e, _M_size, _Array<_Tp>(_M_data)); }
+
+  template<typename _Tp>
+  inline valarray<_Tp>::~valarray ()
+  {
+      __valarray_destroy_elements(_M_data, _M_data + _M_size);
+      __valarray_release_memory(_M_data);
+  }
+
+  template<typename _Tp>
+  inline valarray<_Tp>&
+  valarray<_Tp>::operator= (const valarray<_Tp>& __v)
+  {
+      __valarray_copy(__v._M_data, _M_size, _M_data);
+      return *this;
+  }
+
+  template<typename _Tp>
+  inline valarray<_Tp>&
+  valarray<_Tp>::operator= (const _Tp& __t)
+  {
+      __valarray_fill (_M_data, _M_size, __t);
+      return *this;
+  }
+
+  template<typename _Tp>
+  inline valarray<_Tp>&
+  valarray<_Tp>::operator= (const slice_array<_Tp>& __sa)
+  {
+      __valarray_copy (__sa._M_array, __sa._M_sz,
+              __sa._M_stride, _Array<_Tp>(_M_data));
+      return *this;
+  }
+
+  template<typename _Tp>
+  inline valarray<_Tp>&
+  valarray<_Tp>::operator= (const gslice_array<_Tp>& __ga)
+  {
+      __valarray_copy (__ga._M_array, _Array<size_t>(__ga._M_index),
+              _Array<_Tp>(_M_data), _M_size);
+      return *this;
+  }
+
+  template<typename _Tp>
+  inline valarray<_Tp>&
+  valarray<_Tp>::operator= (const mask_array<_Tp>& __ma)
+  {
+      __valarray_copy (__ma._M_array, __ma._M_mask,
+              _Array<_Tp>(_M_data), _M_size);
+      return *this;
+  }
+
+  template<typename _Tp>
+  inline valarray<_Tp>&
+  valarray<_Tp>::operator= (const indirect_array<_Tp>& __ia)
+  {
+      __valarray_copy (__ia._M_array, __ia._M_index,
+               _Array<_Tp>(_M_data), _M_size);
+      return *this;
+  }
+
+  template<typename _Tp> template<class _Dom>
+  inline valarray<_Tp>&
+  valarray<_Tp>::operator= (const _Expr<_Dom, _Tp>& __e)
+  {
+      __valarray_copy (__e, _M_size, _Array<_Tp>(_M_data));
+      return *this;
+  }
+
+  template<typename _Tp>
+  inline _Expr<_SClos<_ValArray,_Tp>, _Tp>
+  valarray<_Tp>::operator[] (slice __s) const
+  {
+      typedef _SClos<_ValArray,_Tp> _Closure;
+      return _Expr<_Closure, _Tp> (_Closure (_Array<_Tp>(_M_data), __s));
+  }
+
+  template<typename _Tp>
+  inline slice_array<_Tp>
+  valarray<_Tp>::operator[] (slice __s)
+  {
+      return slice_array<_Tp> (_Array<_Tp>(_M_data), __s);
+  }
+
+  template<typename _Tp>
+  inline _Expr<_GClos<_ValArray,_Tp>, _Tp>
+  valarray<_Tp>::operator[] (const gslice& __gs) const
+  {
+      typedef _GClos<_ValArray,_Tp> _Closure;
+      return _Expr<_Closure, _Tp>
+          (_Closure (_Array<_Tp>(_M_data), __gs._M_index->_M_index));
+  }
+
+  template<typename _Tp>
+  inline gslice_array<_Tp>
+  valarray<_Tp>::operator[] (const gslice& __gs)
+  {
+      return gslice_array<_Tp>
+          (_Array<_Tp>(_M_data), __gs._M_index->_M_index);
+  }
+
+  template<typename _Tp>
+  inline valarray<_Tp>
+  valarray<_Tp>::operator[] (const valarray<bool>& __m) const
+  {
+      size_t __s (0);
+      size_t __e (__m.size ());
+      for (size_t __i=0; __i<__e; ++__i)
+          if (__m[__i]) ++__s;
+      return valarray<_Tp> (mask_array<_Tp> (_Array<_Tp>(_M_data), __s,
+                                         _Array<bool> (__m)));
+  }
+
+  template<typename _Tp>
+  inline mask_array<_Tp>
+  valarray<_Tp>::operator[] (const valarray<bool>& __m)
+  {
+      size_t __s (0);
+      size_t __e (__m.size ());
+      for (size_t __i=0; __i<__e; ++__i)
+          if (__m[__i]) ++__s;
+      return mask_array<_Tp> (_Array<_Tp>(_M_data), __s, _Array<bool> (__m));
+  }
+
+  template<typename _Tp>
+  inline _Expr<_IClos<_ValArray,_Tp>, _Tp>
+  valarray<_Tp>::operator[] (const valarray<size_t>& __i) const
+  {
+      typedef _IClos<_ValArray,_Tp> _Closure;
+      return _Expr<_Closure, _Tp> (_Closure (*this, __i));
+  }
+
+  template<typename _Tp>
+  inline indirect_array<_Tp>
+  valarray<_Tp>::operator[] (const valarray<size_t>& __i)
+  {
+      return indirect_array<_Tp> (_Array<_Tp>(_M_data), __i.size(),
+                                _Array<size_t> (__i));
+  }
+
+  template<class _Tp>
+  inline size_t valarray<_Tp>::size () const { return _M_size; }
+
+  template<class _Tp>
+  inline _Tp
+  valarray<_Tp>::sum () const
+  {
+      return __valarray_sum(_M_data, _M_data + _M_size);
+  }
+
+//   template<typename _Tp>
+//   inline _Tp
+//   valarray<_Tp>::product () const
+//   {
+//       return __valarray_product(_M_data, _M_data + _M_size);
+//   }
+
+  template <class _Tp>
+     inline valarray<_Tp>
+     valarray<_Tp>::shift(int __n) const
+     {
+       _Tp* const __a = static_cast<_Tp*>
+         (__builtin_alloca(sizeof(_Tp) * _M_size));
+       if (__n == 0)                          // no shift
+         __valarray_copy_construct(_M_data, _M_data + _M_size, __a);
+       else if (__n > 0)         // __n > 0: shift left
+         {                 
+           if (size_t(__n) > _M_size)
+             __valarray_default_construct(__a, __a + __n);
+           else
+             {
+               __valarray_copy_construct(_M_data+__n, _M_data + _M_size, __a);
+               __valarray_default_construct(__a+_M_size-__n, __a + _M_size);
+             }
+         }
+       else                        // __n < 0: shift right
+         {                          
+           __valarray_copy_construct (_M_data, _M_data+_M_size+__n, __a-__n);
+           __valarray_default_construct(__a, __a - __n);
+         }
+       return valarray<_Tp> (__a, _M_size);
+     }
+
+  template <class _Tp>
+     inline valarray<_Tp>
+     valarray<_Tp>::cshift (int __n) const
+     {
+       _Tp* const __a = static_cast<_Tp*>
+         (__builtin_alloca (sizeof(_Tp) * _M_size));
+       if (__n == 0)               // no cshift
+         __valarray_copy_construct(_M_data, _M_data + _M_size, __a);
+       else if (__n > 0)           // cshift left
+         {               
+           __valarray_copy_construct(_M_data, _M_data+__n, __a+_M_size-__n);
+           __valarray_copy_construct(_M_data+__n, _M_data + _M_size, __a);
+         }
+       else                        // cshift right
+         {                       
+           __valarray_copy_construct
+             (_M_data + _M_size+__n, _M_data + _M_size, __a);
+           __valarray_copy_construct
+             (_M_data, _M_data + _M_size+__n, __a - __n);
+         }
+       return valarray<_Tp>(__a, _M_size);
+     }
+
+  template <class _Tp>
+  inline void
+  valarray<_Tp>::resize (size_t __n, _Tp __c)
+  {
+    // This complication is so to make valarray<valarray<T> > work
+    // even though it is not required by the standard.  Nobody should
+    // be saying valarray<valarray<T> > anyway.  See the specs.
+    __valarray_destroy_elements(_M_data, _M_data + _M_size);
+    if (_M_size != __n)
+      {
+        __valarray_release_memory(_M_data);
+        _M_size = __n;
+        _M_data = __valarray_get_storage<_Tp>(__n);
+      }
+    __valarray_fill_construct(_M_data, _M_data + __n, __c);
+  }
+    
+  template<typename _Tp>
+  inline _Tp
+  valarray<_Tp>::min() const
+  {
+      return *min_element (_M_data, _M_data+_M_size);
+  }
+
+  template<typename _Tp>
+  inline _Tp
+  valarray<_Tp>::max() const
+  {
+      return *max_element (_M_data, _M_data+_M_size);
+  }
+  
+  template<class _Tp>
+  inline _Expr<_ValFunClos<_ValArray,_Tp>,_Tp>
+  valarray<_Tp>::apply (_Tp func (_Tp)) const
+  {
+      typedef _ValFunClos<_ValArray,_Tp> _Closure;
+      return _Expr<_Closure,_Tp> (_Closure (*this, func));
+  }
+
+  template<class _Tp>
+  inline _Expr<_RefFunClos<_ValArray,_Tp>,_Tp>
+  valarray<_Tp>::apply (_Tp func (const _Tp &)) const
+  {
+      typedef _RefFunClos<_ValArray,_Tp> _Closure;
+      return _Expr<_Closure,_Tp> (_Closure (*this, func));
+  }
+
+#define _DEFINE_VALARRAY_UNARY_OPERATOR(_Op, _Name)                     \
+  template<typename _Tp>                                               \
+  inline _Expr<_UnClos<_Name,_ValArray,_Tp>, _Tp>                      \
+  valarray<_Tp>::operator _Op() const                                  \
+  {                                                                    \
+      typedef _UnClos<_Name,_ValArray,_Tp> _Closure;                   \
+      return _Expr<_Closure, _Tp> (_Closure (*this));                  \
+  }
+
+    _DEFINE_VALARRAY_UNARY_OPERATOR(+, _Unary_plus)
+    _DEFINE_VALARRAY_UNARY_OPERATOR(-, negate)
+    _DEFINE_VALARRAY_UNARY_OPERATOR(~, _Bitwise_not)
+
+#undef _DEFINE_VALARRAY_UNARY_OPERATOR
+  
+  template<typename _Tp>
+  inline _Expr<_UnClos<logical_not,_ValArray,_Tp>, bool>
+  valarray<_Tp>::operator!() const
+  {
+      typedef _UnClos<logical_not,_ValArray,_Tp> _Closure;
+      return _Expr<_Closure, bool> (_Closure (*this));
+  }
+
+#define _DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(_Op, _Name)               \
+  template<class _Tp>                                                  \
+  inline valarray<_Tp> &                                               \
+  valarray<_Tp>::operator _Op##= (const _Tp &__t)                      \
+  {                                                                    \
+      _Array_augmented_##_Name (_Array<_Tp>(_M_data), _M_size, __t);   \
+      return *this;                                                    \
+  }                                                                    \
+                                                                       \
+  template<class _Tp>                                                  \
+  inline valarray<_Tp> &                                               \
+  valarray<_Tp>::operator _Op##= (const valarray<_Tp> &__v)            \
+  {                                                                    \
+      _Array_augmented_##_Name (_Array<_Tp>(_M_data), _M_size,                 \
+                               _Array<_Tp>(__v._M_data));              \
+      return *this;                                                    \
+  }
+
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(+, plus)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(-, minus)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(*, multiplies)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(/, divides)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(%, modulus)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(^, xor)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(&, and)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(|, or)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(<<, shift_left)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(>>, shift_right)
+
+#undef _DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT
+
+
+} // std::
+  
+
+namespace std
+{
+
+#define _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(_Op, _Name)          \
+  template<class _Tp> template<class _Dom>                             \
+  inline valarray<_Tp> &                                               \
+  valarray<_Tp>::operator _Op##= (const _Expr<_Dom,_Tp> &__e)          \
+  {                                                                    \
+      _Array_augmented_##_Name (_Array<_Tp>(_M_data), __e, _M_size);   \
+      return *this;                                                    \
+  }
+
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(+, plus)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(-, minus)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(*, multiplies)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(/, divides)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(%, modulus)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(^, xor)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(&, and)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(|, or)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(<<, shift_left)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(>>, shift_right)
+
+#undef _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT
+    
+
+#define _DEFINE_BINARY_OPERATOR(_Op, _Name)                            \
+  template<typename _Tp>                                               \
+  inline _Expr<_BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp>, _Tp>        \
+  operator _Op (const valarray<_Tp> &__v, const valarray<_Tp> &__w)    \
+  {                                                                    \
+      typedef _BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp> _Closure;     \
+      return _Expr<_Closure, _Tp> (_Closure (__v, __w));               \
+  }                                                                    \
+                                                                       \
+  template<typename _Tp>                                               \
+  inline _Expr<_BinClos<_Name,_ValArray,_Constant,_Tp,_Tp>,_Tp>         \
+  operator _Op (const valarray<_Tp> &__v, const _Tp &__t)              \
+  {                                                                    \
+      typedef _BinClos<_Name,_ValArray,_Constant,_Tp,_Tp> _Closure;    \
+      return _Expr<_Closure, _Tp> (_Closure (__v, __t));               \
+  }                                                                    \
+                                                                       \
+  template<typename _Tp>                                               \
+  inline _Expr<_BinClos<_Name,_Constant,_ValArray,_Tp,_Tp>,_Tp>         \
+  operator _Op (const _Tp &__t, const valarray<_Tp> &__v)              \
+  {                                                                    \
+      typedef _BinClos<_Name,_Constant,_ValArray,_Tp,_Tp> _Closure;     \
+      return _Expr<_Closure, _Tp> (_Closure (__t, __v));               \
+  }
+
+_DEFINE_BINARY_OPERATOR(+, plus)
+_DEFINE_BINARY_OPERATOR(-, minus)
+_DEFINE_BINARY_OPERATOR(*, multiplies)
+_DEFINE_BINARY_OPERATOR(/, divides)
+_DEFINE_BINARY_OPERATOR(%, modulus)
+_DEFINE_BINARY_OPERATOR(^, _Bitwise_xor)
+_DEFINE_BINARY_OPERATOR(&, _Bitwise_and)
+_DEFINE_BINARY_OPERATOR(|, _Bitwise_or)
+_DEFINE_BINARY_OPERATOR(<<, _Shift_left)
+_DEFINE_BINARY_OPERATOR(>>, _Shift_right)
+
+#undef _DEFINE_BINARY_OPERATOR
+
+#define _DEFINE_LOGICAL_OPERATOR(_Op, _Name)                           \
+  template<typename _Tp>                                               \
+  inline _Expr<_BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp>,bool>        \
+  operator _Op (const valarray<_Tp> &__v, const valarray<_Tp> &__w)    \
+  {                                                                    \
+      typedef _BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp> _Closure;     \
+      return _Expr<_Closure, bool> (_Closure (__v, __w));               \
+  }                                                                    \
+                                                                       \
+  template<class _Tp>                                                  \
+  inline _Expr<_BinClos<_Name,_ValArray,_Constant,_Tp,_Tp>,bool>        \
+  operator _Op (const valarray<_Tp> &__v, const _Tp &__t)              \
+  {                                                                    \
+      typedef _BinClos<_Name,_ValArray,_Constant,_Tp,_Tp> _Closure;     \
+      return _Expr<_Closure, bool> (_Closure (__v, __t));              \
+  }                                                                    \
+                                                                       \
+  template<class _Tp>                                                  \
+  inline _Expr<_BinClos<_Name,_Constant,_ValArray,_Tp,_Tp>,bool>        \
+  operator _Op (const _Tp &__t, const valarray<_Tp> &__v)              \
+  {                                                                    \
+      typedef _BinClos<_Name,_Constant,_ValArray,_Tp,_Tp> _Closure;     \
+      return _Expr<_Closure, bool> (_Closure (__t, __v));              \
+  }
+
+_DEFINE_LOGICAL_OPERATOR(&&, logical_and)
+_DEFINE_LOGICAL_OPERATOR(||, logical_or)
+_DEFINE_LOGICAL_OPERATOR(==, equal_to)
+_DEFINE_LOGICAL_OPERATOR(!=, not_equal_to)
+_DEFINE_LOGICAL_OPERATOR(<, less)
+_DEFINE_LOGICAL_OPERATOR(>, greater)
+_DEFINE_LOGICAL_OPERATOR(<=, less_equal)
+_DEFINE_LOGICAL_OPERATOR(>=, greater_equal)
+
+#undef _DEFINE_LOGICAL_OPERATOR
+
+} // namespace std
+
+#endif // _CPP_VALARRAY
+
+// Local Variables:
+// mode:c++
+// End:
diff --git a/libstdc++-v3/include/std/std_vector.h b/libstdc++-v3/include/std/std_vector.h
new file mode 100644 (file)
index 0000000..995daec
--- /dev/null
@@ -0,0 +1,78 @@
+// <vector> -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file std_vector.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_VECTOR
+#define _CPP_VECTOR 1
+
+#pragma GCC system_header
+
+#include <bits/functexcept.h>
+#include <bits/stl_algobase.h>
+#include <bits/stl_alloc.h>
+#include <bits/stl_construct.h>
+#include <bits/stl_uninitialized.h>
+#include <bits/stl_vector.h>
+#include <bits/stl_bvector.h> 
+
+#endif /* _CPP_VECTOR */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/libstdc++-v3/include/std/stdexcept b/libstdc++-v3/include/std/stdexcept
deleted file mode 100644 (file)
index 66bac50..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-// Standard exception classes  -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-//
-// ISO C++ 19.1  Exception classes
-//
-
-/** @file std_stdexcept.h
- *  The Standard C++ library provides classes to be used to report certain
- *  errors (17.4.4.8) in C++ programs.  In the error model reflected in these
- *  classes, errors are divided into two broad categories: logic errors and
- *  runtime errors.
- */
-
-#ifndef _CPP_STDEXCEPT
-#define _CPP_STDEXCEPT           1
-
-#pragma GCC system_header
-
-#include <exception>
-#include <string>
-
-namespace std 
-{
-  /** Logic errors represent problems in the internal logic of a program;
-   *  in theory, these are preventable, and even detectable before the
-   *  program runs (e.g., violations of class invariants).
-   *  @brief One of two subclasses of exception.
-   */
-  class logic_error : public exception 
-  {
-    string _M_msg;
-
-  public:
-    /** Takes a character string describing the error.  */
-    explicit 
-    logic_error(const string&  __arg);
-
-    virtual 
-    ~logic_error() throw();
-
-    /** Returns a C-style character string describing the general cause of
-     *  the current error (the same string passed to the ctor).  */
-    virtual const char* 
-    what() const throw();
-  };
-
-  /** Thrown by the library, or by you, to report domain errors (domain in
-   *  the mathmatical sense).  */
-  class domain_error : public logic_error 
-  {
-  public:
-    explicit domain_error(const string&  __arg);
-  };
-
-  /** Thrown to report invalid arguments to functions.  */
-  class invalid_argument : public logic_error 
-  {
-  public:
-    explicit invalid_argument(const string&  __arg);
-  };
-
-  /** Thrown when an object is constructed that would exceed its maximum
-   *  permitted size (e.g., a basic_string instance).  */
-  class length_error : public logic_error 
-  {
-  public:
-    explicit length_error(const string&  __arg);
-  };
-
-  /** This represents an argument whose value is not within the expected
-   *  range (e.g., boundary checks in basic_string).  */
-  class out_of_range : public logic_error 
-  {
-  public:
-    explicit out_of_range(const string&  __arg);
-  };
-
-  /** Runtime errors represent problems outside the scope of a program;
-   *  they cannot be easily predicted and can generally only be caught as
-   *  the program executes.
-   *  @brief One of two subclasses of exception.
-   */
-  class runtime_error : public exception 
-  {
-    string _M_msg;
-
-  public:
-    /** Takes a character string describing the error.  */
-    explicit 
-    runtime_error(const string&  __arg);
-
-    virtual 
-    ~runtime_error() throw();
-
-    /** Returns a C-style character string describing the general cause of
-     *  the current error (the same string passed to the ctor).  */
-    virtual const char* 
-    what() const throw();
-  };
-
-  /** Thrown to indicate range errors in internal computations.  */
-  class range_error : public runtime_error 
-  {
-  public:
-    explicit range_error(const string&  __arg);
-  };
-
-  /** Thrown to indicate arithmetic overflow.  */
-  class overflow_error : public runtime_error 
-  {
-  public:
-    explicit overflow_error(const string&  __arg);
-  };
-
-  /** Thrown to indicate arithmetic underflow.  */
-  class underflow_error : public runtime_error 
-  {
-  public:
-    explicit underflow_error(const string&  __arg);
-  };
-} // namespace std
-
-#endif // _CPP_STDEXCEPT
diff --git a/libstdc++-v3/include/std/streambuf b/libstdc++-v3/include/std/streambuf
deleted file mode 100644 (file)
index 59f7070..0000000
+++ /dev/null
@@ -1,540 +0,0 @@
-// Stream buffer classes -*- C++ -*-
-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-//
-// ISO C++ 14882: 27.5  Stream buffers
-//
-
-/** @file std_streambuf.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_STREAMBUF
-#define _CPP_STREAMBUF 1
-
-#pragma GCC system_header
-
-#include <bits/c++config.h>
-#include <iosfwd>
-#include <cstdio>      // For SEEK_SET, SEEK_CUR, SEEK_END
-#include <bits/localefwd.h>
-#include <bits/ios_base.h>
-
-namespace std
-{
-  template<typename _CharT, typename _Traits>
-    streamsize
-    __copy_streambufs(basic_ios<_CharT, _Traits>& _ios,
-                     basic_streambuf<_CharT, _Traits>* __sbin,
-                     basic_streambuf<_CharT, _Traits>* __sbout);
-  
-  // 27.5.2 Template class basic_streambuf<_CharT, _Traits>
-  template<typename _CharT, typename _Traits>
-    class basic_streambuf 
-    {
-    public:
-      // Types:
-      typedef _CharT                                   char_type;
-      typedef _Traits                                  traits_type;
-      typedef typename traits_type::int_type           int_type;
-      typedef typename traits_type::pos_type           pos_type;
-      typedef typename traits_type::off_type           off_type;
-
-      // Non-standard Types:
-      typedef ctype<char_type>                         __ctype_type;
-      typedef basic_streambuf<char_type, traits_type>          __streambuf_type;
-      
-      friend class basic_ios<char_type, traits_type>;
-      friend class basic_istream<char_type, traits_type>;
-      friend class basic_ostream<char_type, traits_type>;
-      friend class istreambuf_iterator<char_type, traits_type>;
-      friend class ostreambuf_iterator<char_type, traits_type>;
-
-      friend streamsize
-      __copy_streambufs<>(basic_ios<char_type, traits_type>& __ios,
-                         __streambuf_type* __sbin,__streambuf_type* __sbout);
-      
-    protected:
-
-      // Pointer to the beginning of internally-allocated
-      // space. Filebuf manually allocates/deallocates this, whereas
-      // stringstreams attempt to use the built-in intelligence of the
-      // string class. If you are managing memory, set this. If not,
-      // leave it NULL.
-      char_type*               _M_buf;         
-
-      // Actual size of allocated internal buffer, in bytes.
-      int_type                 _M_buf_size;
-
-      // Optimal or preferred size of internal buffer, in bytes.
-      int_type                 _M_buf_size_opt;
-
-      // True iff _M_in_* and _M_out_* buffers should always point to
-      // the same place.  True for fstreams, false for sstreams.
-      bool                     _M_buf_unified; 
-
-      // This is based on _IO_FILE, just reordered to be more
-      // consistent, and is intended to be the most minimal abstraction
-      // for an internal buffer.
-      // get == input == read
-      // put == output == write
-      char_type*               _M_in_beg;      // Start of get area. 
-      char_type*               _M_in_cur;      // Current read area. 
-      char_type*               _M_in_end;      // End of get area. 
-      char_type*               _M_out_beg;     // Start of put area. 
-      char_type*               _M_out_cur;     // Current put area. 
-      char_type*               _M_out_end;     // End of put area. 
-
-      // Place to stash in || out || in | out settings for current streambuf.
-      ios_base::openmode       _M_mode;        
-
-      // Current locale setting.
-      locale                   _M_buf_locale;  
-
-      // True iff locale is initialized.
-      bool                     _M_buf_locale_init;
-
-      // Necessary bits for putback buffer management. Only used in
-      // the basic_filebuf class, as necessary for the standard
-      // requirements. The only basic_streambuf member function that
-      // needs access to these data members is in_avail...
-      // NB: pbacks of over one character are not currently supported.
-      int_type                 _M_pback_size; 
-      char_type*               _M_pback; 
-      char_type*               _M_pback_cur_save;
-      char_type*               _M_pback_end_save;
-      bool                     _M_pback_init; 
-
-      // Initializes pback buffers, and moves normal buffers to safety.
-      // Assumptions:
-      // _M_in_cur has already been moved back
-      void
-      _M_pback_create()
-      {
-       if (!_M_pback_init)
-         {
-           int_type __dist = _M_in_end - _M_in_cur;
-           int_type __len = min(_M_pback_size, __dist);
-           traits_type::copy(_M_pback, _M_in_cur, __len);
-           _M_pback_cur_save = _M_in_cur;
-           _M_pback_end_save = _M_in_end;
-           this->setg(_M_pback, _M_pback, _M_pback + __len);
-           _M_pback_init = true;
-         }
-      }
-
-      // Deactivates pback buffer contents, and restores normal buffer.
-      // Assumptions:
-      // The pback buffer has only moved forward.
-      void
-      _M_pback_destroy()
-      {
-       if (_M_pback_init)
-         {
-           // Length _M_in_cur moved in the pback buffer.
-           int_type __off_cur = _M_in_cur - _M_pback;
-           
-           // For in | out buffers, the end can be pushed back...
-           int_type __off_end = 0;
-           int_type __pback_len = _M_in_end - _M_pback;
-           int_type __save_len = _M_pback_end_save - _M_buf;
-           if (__pback_len > __save_len)
-             __off_end = __pback_len - __save_len;
-
-           this->setg(_M_buf, _M_pback_cur_save + __off_cur, 
-                      _M_pback_end_save + __off_end);
-           _M_pback_cur_save = NULL;
-           _M_pback_end_save = NULL;
-           _M_pback_init = false;
-         }
-      }
-
-      // Correctly sets the _M_in_cur pointer, and bumps the
-      // _M_out_cur pointer as well if necessary.
-      void 
-      _M_in_cur_move(off_type __n) // argument needs to be +-
-      {
-       bool __testout = _M_out_cur;
-       _M_in_cur += __n;
-       if (__testout && _M_buf_unified)
-         _M_out_cur += __n;
-      }
-
-      // Correctly sets the _M_out_cur pointer, and bumps the
-      // appropriate _M_*_end pointers as well. Necessary for the
-      // un-tied stringbufs, in in|out mode.
-      // Invariant:
-      // __n + _M_out_[cur, end] <= _M_buf + _M_buf_size
-      // Assuming all _M_*_[beg, cur, end] pointers are operating on
-      // the same range:
-      // _M_buf <= _M_*_ <= _M_buf + _M_buf_size
-      void 
-      _M_out_cur_move(off_type __n) // argument needs to be +-
-      {
-       bool __testin = _M_in_cur;
-
-       _M_out_cur += __n;
-       if (__testin && _M_buf_unified)
-         _M_in_cur += __n;
-       if (_M_out_cur > _M_out_end)
-         {
-           _M_out_end = _M_out_cur;
-           // NB: in | out buffers drag the _M_in_end pointer along...
-           if (__testin)
-             _M_in_end += __n;
-         }
-      }
-
-      // Return the size of the output buffer.  This depends on the
-      // buffer in use: allocated buffers have a stored size in
-      // _M_buf_size and setbuf() buffers don't.
-      off_type
-      _M_out_buf_size()
-      {
-       off_type __ret = 0;
-       if (_M_out_cur)
-         {
-           // Using allocated buffer.
-           if (_M_out_beg == _M_buf)
-             __ret = _M_out_beg + _M_buf_size - _M_out_cur;
-           // Using non-allocated buffer.
-           else
-             __ret = _M_out_end - _M_out_cur;
-         }
-       return __ret;
-      }
-
-      // These three functions are used to clarify internal buffer
-      // maintenance. After an overflow, or after a seekoff call that
-      // started at beg or end, or possibly when the stream becomes
-      // unbuffered, and a myrid other obscure corner cases, the
-      // internal buffer does not truly reflect the contents of the
-      // external buffer. At this point, for whatever reason, it is in
-      // an indeterminate state.
-      void
-      _M_set_indeterminate(void)
-      {
-       if (_M_mode & ios_base::in)
-         this->setg(_M_buf, _M_buf, _M_buf);
-       if (_M_mode & ios_base::out)
-         this->setp(_M_buf, _M_buf);
-      }
-
-      void
-      _M_set_determinate(off_type __off)
-      {
-       bool __testin = _M_mode & ios_base::in;
-       bool __testout = _M_mode & ios_base::out;
-       if (__testin)
-         this->setg(_M_buf, _M_buf, _M_buf + __off);
-       if (__testout)
-         this->setp(_M_buf, _M_buf + __off);
-      }
-
-      bool
-      _M_is_indeterminate(void)
-      { 
-       bool __ret = false;
-       // Don't return true if unbuffered.
-       if (_M_buf)
-         {
-           if (_M_mode & ios_base::in)
-             __ret = _M_in_beg == _M_in_cur && _M_in_cur == _M_in_end;
-           if (_M_mode & ios_base::out)
-             __ret = _M_out_beg == _M_out_cur && _M_out_cur == _M_out_end;
-         }
-       return __ret;
-      }
-
-  public:
-      virtual 
-      ~basic_streambuf() 
-      {
-       _M_buf_unified = false;
-       _M_buf_size = 0;
-       _M_buf_size_opt = 0;
-       _M_mode = ios_base::openmode(0);
-       _M_buf_locale_init = false;
-      }
-
-      // Locales:
-      locale 
-      pubimbue(const locale &__loc)
-      {
-       locale __tmp(this->getloc());
-       this->imbue(__loc);
-       return __tmp;
-      }
-
-      locale   
-      getloc() const
-      {
-       if (_M_buf_locale_init)
-         return _M_buf_locale; 
-       else 
-         return locale();
-      } 
-
-      // Buffer and positioning:
-      __streambuf_type* 
-      pubsetbuf(char_type* __s, streamsize __n) 
-      { return this->setbuf(__s, __n); }
-
-      pos_type 
-      pubseekoff(off_type __off, ios_base::seekdir __way, 
-                ios_base::openmode __mode = ios_base::in | ios_base::out)
-      { return this->seekoff(__off, __way, __mode); }
-
-      pos_type 
-      pubseekpos(pos_type __sp,
-                ios_base::openmode __mode = ios_base::in | ios_base::out)
-      { return this->seekpos(__sp, __mode); }
-
-      int 
-      pubsync() { return this->sync(); }
-
-      // Get and put areas:
-      // Get area:
-      streamsize 
-      in_avail() 
-      { 
-       streamsize __ret;
-       if (_M_in_cur && _M_in_cur < _M_in_end)
-         {
-           if (_M_pback_init)
-             {
-               int_type __save_len =  _M_pback_end_save - _M_pback_cur_save;
-               int_type __pback_len = _M_in_cur - _M_pback;
-               __ret = __save_len - __pback_len;
-             }
-           else
-             __ret = this->egptr() - this->gptr();
-         }
-       else
-         __ret = this->showmanyc();
-       return __ret;
-      }
-
-      int_type 
-      snextc()
-      {
-       int_type __eof = traits_type::eof();
-       return (this->sbumpc() == __eof ? __eof : this->sgetc()); 
-      }
-
-      int_type 
-      sbumpc();
-
-      int_type 
-      sgetc()
-      {
-       int_type __ret;
-       if (_M_in_cur && _M_in_cur < _M_in_end)
-         __ret = traits_type::to_int_type(*(this->gptr()));
-       else 
-         __ret = this->underflow();
-       return __ret;
-      }
-
-      streamsize 
-      sgetn(char_type* __s, streamsize __n)
-      { return this->xsgetn(__s, __n); }
-
-      // Putback:
-      int_type 
-      sputbackc(char_type __c);
-
-      int_type 
-      sungetc();
-
-      // Put area:
-      int_type 
-      sputc(char_type __c);
-
-      streamsize 
-      sputn(const char_type* __s, streamsize __n)
-      { return this->xsputn(__s, __n); }
-
-    protected:
-      basic_streambuf()
-      : _M_buf(NULL), _M_buf_size(0), 
-      _M_buf_size_opt(static_cast<int_type>(BUFSIZ)), _M_buf_unified(false), 
-      _M_in_beg(0), _M_in_cur(0), _M_in_end(0), _M_out_beg(0), _M_out_cur(0), 
-      _M_out_end(0), _M_mode(ios_base::openmode(0)), _M_buf_locale(locale()), 
-      _M_buf_locale_init(false), _M_pback_size(1), _M_pback(NULL), 
-      _M_pback_cur_save(NULL), _M_pback_end_save(NULL), _M_pback_init(false)
-      { }
-
-      // Get area:
-      char_type* 
-      eback() const { return _M_in_beg; }
-
-      char_type* 
-      gptr()  const { return _M_in_cur;  }
-
-      char_type* 
-      egptr() const { return _M_in_end; }
-
-      void 
-      gbump(int __n) { _M_in_cur += __n; }
-
-      void 
-      setg(char_type* __gbeg, char_type* __gnext, char_type* __gend)
-      {
-       _M_in_beg = __gbeg;
-       _M_in_cur = __gnext;
-       _M_in_end = __gend;
-       if (!(_M_mode & ios_base::in) && __gbeg && __gnext && __gend)
-         _M_mode = _M_mode | ios_base::in;
-      }
-
-      // Put area:
-      char_type* 
-      pbase() const { return _M_out_beg; }
-
-      char_type* 
-      pptr() const { return _M_out_cur; }
-
-      char_type* 
-      epptr() const { return _M_out_end; }
-
-      void 
-      pbump(int __n) { _M_out_cur += __n; }
-
-      void 
-      setp(char_type* __pbeg, char_type* __pend)
-      { 
-       _M_out_beg = _M_out_cur = __pbeg; 
-       _M_out_end = __pend; 
-       if (!(_M_mode & ios_base::out) && __pbeg && __pend)
-         _M_mode = _M_mode | ios_base::out;
-      }
-
-      // Virtual functions:
-      // Locales:
-      virtual void 
-      imbue(const locale& __loc) 
-      { 
-       _M_buf_locale_init = true;
-       if (_M_buf_locale != __loc)
-         _M_buf_locale = __loc;
-      }
-
-      // Buffer management and positioning:
-      virtual basic_streambuf<char_type,_Traits>* 
-      setbuf(char_type*, streamsize)
-      {        return this; }
-      
-      virtual pos_type 
-      seekoff(off_type, ios_base::seekdir,
-             ios_base::openmode /*__mode*/ = ios_base::in | ios_base::out)
-      { return pos_type(off_type(-1)); } 
-
-      virtual pos_type 
-      seekpos(pos_type, 
-             ios_base::openmode /*__mode*/ = ios_base::in | ios_base::out)
-      { return pos_type(off_type(-1)); } 
-
-      virtual int 
-      sync() { return 0; }
-
-      // Get area:
-      virtual streamsize 
-      showmanyc() { return 0; }
-
-      virtual streamsize 
-      xsgetn(char_type* __s, streamsize __n);
-
-      virtual int_type 
-      underflow()
-      { return traits_type::eof(); }
-
-      virtual int_type 
-      uflow() 
-      {
-       int_type __ret = traits_type::eof();
-       bool __testeof = this->underflow() == __ret;
-       bool __testpending = _M_in_cur && _M_in_cur < _M_in_end;
-       if (!__testeof && __testpending)
-         {
-           __ret = traits_type::to_int_type(*_M_in_cur);
-           ++_M_in_cur;
-           if (_M_buf_unified && _M_mode & ios_base::out)
-             ++_M_out_cur;
-         }
-       return __ret;    
-      }
-
-      // Putback:
-      virtual int_type 
-      pbackfail(int_type /* __c */  = traits_type::eof())
-      { return traits_type::eof(); }
-
-      // Put area:
-      virtual streamsize 
-      xsputn(const char_type* __s, streamsize __n);
-
-      virtual int_type 
-      overflow(int_type /* __c */ = traits_type::eof())
-      { return traits_type::eof(); }
-
-#ifdef _GLIBCPP_DEPRECATED
-    public:
-      void 
-      stossc() 
-      {
-       if (_M_in_cur < _M_in_end) 
-         ++_M_in_cur;
-       else 
-         this->uflow();
-      }
-#endif
-
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
-    // Side effect of DR 50.
-    private:
-      basic_streambuf(const __streambuf_type&);
-
-      __streambuf_type& 
-      operator=(const __streambuf_type&);
-#endif
-    };
-
-} // namespace std
-
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# define export
-#ifdef  _GLIBCPP_FULLY_COMPLIANT_HEADERS
-#include <bits/streambuf.tcc>
-#endif
-#endif
-
-#endif /* _CPP_STREAMBUF */
-
diff --git a/libstdc++-v3/include/std/string b/libstdc++-v3/include/std/string
deleted file mode 100644 (file)
index 9cdc533..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-// Components for manipulating sequences of characters -*- C++ -*-
-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-//
-// ISO C++ 14882: 21  Strings library
-//
-
-/** @file std_string.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_STRING
-#define _CPP_STRING    1
-
-#pragma GCC system_header
-
-#include <bits/c++config.h>
-#include <bits/stringfwd.h>
-#include <bits/char_traits.h>
-#include <memory>      // For allocator.
-#include <bits/type_traits.h>
-#include <iosfwd>      // For operators >>, <<, and getline decls.
-#include <bits/stl_iterator.h>
-#include <bits/stl_function.h>  // For less
-#include <bits/basic_string.h>
-
-#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
-# include <algorithm> // for find_if
-# include <bits/basic_string.tcc> 
-#endif
-
-#endif /* _CPP_STRING */
-
diff --git a/libstdc++-v3/include/std/utility b/libstdc++-v3/include/std/utility
deleted file mode 100644 (file)
index 5917c83..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-// <utility> -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-/** @file std_utility.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_UTILITY
-#define _CPP_UTILITY 1
-
-#pragma GCC system_header
-#include <bits/c++config.h>
-#include <bits/stl_relops.h>
-#include <bits/stl_pair.h>
-
-#endif /* _CPP_UTILITY */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/libstdc++-v3/include/std/valarray b/libstdc++-v3/include/std/valarray
deleted file mode 100644 (file)
index a354708..0000000
+++ /dev/null
@@ -1,742 +0,0 @@
-// The template and inlines for the -*- C++ -*- valarray class.
-
-// Copyright (C) 1997-1999, 2000, 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
-
-/** @file std_valarray.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_VALARRAY
-#define _CPP_VALARRAY 1
-
-#pragma GCC system_header
-
-#include <bits/c++config.h>
-#include <cstddef>
-#include <cmath>
-#include <cstdlib>
-#include <numeric>
-#include <functional>
-#include <algorithm>
-
-namespace std
-{
-    template<class _Clos, typename _Tp> class _Expr;
-
-    template<typename _Tp1, typename _Tp2> class _ValArray;    
-
-    template<template<class> class _Oper,
-        template<class, class> class _Meta, class _Dom> struct _UnClos;
-
-    template<template<class> class _Oper,
-        template<class, class> class _Meta1,
-        template<class, class> class _Meta2,
-        class _Dom1, class _Dom2> class _BinClos;
-
-    template<template<class, class> class _Meta, class _Dom> class _SClos;
-
-    template<template<class, class> class _Meta, class _Dom> class _GClos;
-    
-    template<template<class, class> class _Meta, class _Dom> class _IClos;
-    
-    template<template<class, class> class _Meta, class _Dom> class _ValFunClos;
-
-    template<template<class, class> class _Meta, class _Dom> class _RefFunClos;
-
-    template<class _Tp> struct _Unary_plus;
-    template<class _Tp> struct _Bitwise_and;
-    template<class _Tp> struct _Bitwise_or;
-    template<class _Tp> struct _Bitwise_xor;  
-    template<class _Tp> struct _Bitwise_not;
-    template<class _Tp> struct _Shift_left;
-    template<class _Tp> struct _Shift_right;
-  
-    template<class _Tp> class valarray;   // An array of type _Tp
-    class slice;                          // BLAS-like slice out of an array
-    template<class _Tp> class slice_array;
-    class gslice;                         // generalized slice out of an array
-    template<class _Tp> class gslice_array;
-    template<class _Tp> class mask_array;     // masked array
-    template<class _Tp> class indirect_array; // indirected array
-
-} // namespace std
-
-#include <bits/valarray_array.h>
-#include <bits/valarray_meta.h>
-  
-namespace std
-{
-  template<class _Tp> class valarray
-  {
-  public:
-      typedef _Tp value_type;
-
-      // _lib.valarray.cons_ construct/destroy:
-      valarray();
-      explicit valarray(size_t);
-      valarray(const _Tp&, size_t);
-      valarray(const _Tp* __restrict__, size_t);
-      valarray(const valarray&);
-      valarray(const slice_array<_Tp>&);
-      valarray(const gslice_array<_Tp>&);
-      valarray(const mask_array<_Tp>&);
-      valarray(const indirect_array<_Tp>&);
-      template<class _Dom>
-      valarray(const _Expr<_Dom,_Tp>& __e);
-     ~valarray();
-
-      // _lib.valarray.assign_ assignment:
-      valarray<_Tp>& operator=(const valarray<_Tp>&);
-      valarray<_Tp>& operator=(const _Tp&);
-      valarray<_Tp>& operator=(const slice_array<_Tp>&);
-      valarray<_Tp>& operator=(const gslice_array<_Tp>&);
-      valarray<_Tp>& operator=(const mask_array<_Tp>&);
-      valarray<_Tp>& operator=(const indirect_array<_Tp>&);
-
-      template<class _Dom> valarray<_Tp>&
-       operator= (const _Expr<_Dom,_Tp>&);
-
-      // _lib.valarray.access_ element access:
-      // XXX: LWG to be resolved.
-      const _Tp&                 operator[](size_t) const;
-      _Tp&                operator[](size_t);          
-      // _lib.valarray.sub_ subset operations:
-      _Expr<_SClos<_ValArray,_Tp>, _Tp> operator[](slice) const;
-      slice_array<_Tp>    operator[](slice);
-      _Expr<_GClos<_ValArray,_Tp>, _Tp> operator[](const gslice&) const;
-      gslice_array<_Tp>   operator[](const gslice&);
-      valarray<_Tp>             operator[](const valarray<bool>&) const;
-      mask_array<_Tp>     operator[](const valarray<bool>&);
-      _Expr<_IClos<_ValArray, _Tp>, _Tp>
-       operator[](const valarray<size_t>&) const;
-      indirect_array<_Tp> operator[](const valarray<size_t>&);
-
-      // _lib.valarray.unary_ unary operators:
-      _Expr<_UnClos<_Unary_plus,_ValArray,_Tp>,_Tp>  operator+ () const;
-      _Expr<_UnClos<negate,_ValArray,_Tp>,_Tp> operator- () const;
-      _Expr<_UnClos<_Bitwise_not,_ValArray,_Tp>,_Tp> operator~ () const;
-      _Expr<_UnClos<logical_not,_ValArray,_Tp>,bool> operator! () const;
-      
-      // _lib.valarray.cassign_ computed assignment:
-      valarray<_Tp>& operator*= (const _Tp&);
-      valarray<_Tp>& operator/= (const _Tp&);
-      valarray<_Tp>& operator%= (const _Tp&);
-      valarray<_Tp>& operator+= (const _Tp&);
-      valarray<_Tp>& operator-= (const _Tp&);
-      valarray<_Tp>& operator^= (const _Tp&);
-      valarray<_Tp>& operator&= (const _Tp&);
-      valarray<_Tp>& operator|= (const _Tp&);
-      valarray<_Tp>& operator<<=(const _Tp&);
-      valarray<_Tp>& operator>>=(const _Tp&);
-      valarray<_Tp>& operator*= (const valarray<_Tp>&);
-      valarray<_Tp>& operator/= (const valarray<_Tp>&);
-      valarray<_Tp>& operator%= (const valarray<_Tp>&);
-      valarray<_Tp>& operator+= (const valarray<_Tp>&);
-      valarray<_Tp>& operator-= (const valarray<_Tp>&);
-      valarray<_Tp>& operator^= (const valarray<_Tp>&);
-      valarray<_Tp>& operator|= (const valarray<_Tp>&);
-      valarray<_Tp>& operator&= (const valarray<_Tp>&);
-      valarray<_Tp>& operator<<=(const valarray<_Tp>&);
-      valarray<_Tp>& operator>>=(const valarray<_Tp>&);
-
-      template<class _Dom>
-        valarray<_Tp>& operator*= (const _Expr<_Dom,_Tp>&);
-      template<class _Dom>
-        valarray<_Tp>& operator/= (const _Expr<_Dom,_Tp>&);
-      template<class _Dom>
-        valarray<_Tp>& operator%= (const _Expr<_Dom,_Tp>&);
-      template<class _Dom>
-        valarray<_Tp>& operator+= (const _Expr<_Dom,_Tp>&);
-      template<class _Dom>
-        valarray<_Tp>& operator-= (const _Expr<_Dom,_Tp>&);
-      template<class _Dom>
-        valarray<_Tp>& operator^= (const _Expr<_Dom,_Tp>&);
-      template<class _Dom>
-        valarray<_Tp>& operator|= (const _Expr<_Dom,_Tp>&);
-      template<class _Dom>
-        valarray<_Tp>& operator&= (const _Expr<_Dom,_Tp>&);
-      template<class _Dom>
-        valarray<_Tp>& operator<<=(const _Expr<_Dom,_Tp>&);
-      template<class _Dom>
-        valarray<_Tp>& operator>>=(const _Expr<_Dom,_Tp>&);
-
-      
-      // _lib.valarray.members_ member functions:
-      size_t size() const;
-      _Tp    sum() const;      
-      _Tp    min() const;      
-      _Tp    max() const;      
-
-//           // FIXME: Extension
-//       _Tp    product () const;
-
-      valarray<_Tp> shift (int) const;
-      valarray<_Tp> cshift(int) const;
-      _Expr<_ValFunClos<_ValArray,_Tp>,_Tp> apply(_Tp func(_Tp)) const;
-      _Expr<_RefFunClos<_ValArray,_Tp>,_Tp> apply(_Tp func(const _Tp&)) const;
-      void resize(size_t __size, _Tp __c = _Tp());
-
-  private:
-      size_t _M_size;
-      _Tp* __restrict__ _M_data;
-
-      friend class _Array<_Tp>;
-  };
-
-
-  template<typename _Tp> struct _Unary_plus : unary_function<_Tp,_Tp> {
-      _Tp operator() (const _Tp& __t) const { return __t; }
-  };
-
-  template<typename _Tp> struct _Bitwise_and : binary_function<_Tp,_Tp,_Tp> {
-      _Tp operator() (_Tp __x, _Tp __y) const { return __x & __y; }
-  };
-
-  template<typename _Tp> struct _Bitwise_or : binary_function<_Tp,_Tp,_Tp> {
-      _Tp operator() (_Tp __x, _Tp __y) const { return __x | __y; }
-  };
-
-  template<typename _Tp> struct _Bitwise_xor : binary_function<_Tp,_Tp,_Tp> {
-      _Tp operator() (_Tp __x, _Tp __y) const { return __x ^ __y; }
-  };
-  
-  template<typename _Tp> struct _Bitwise_not : unary_function<_Tp,_Tp> {
-      _Tp operator() (_Tp __t) const { return ~__t; }
-  };
-
-  template<typename _Tp> struct _Shift_left : unary_function<_Tp,_Tp> {
-      _Tp operator() (_Tp __x, _Tp __y) const { return __x << __y; }
-  };
-
-  template<typename _Tp> struct _Shift_right : unary_function<_Tp,_Tp> {
-      _Tp operator() (_Tp __x, _Tp __y) const { return __x >> __y; }
-  };
-
-  
-  template<typename _Tp>
-  inline const _Tp&
-  valarray<_Tp>::operator[] (size_t __i) const
-  { return _M_data[__i]; }
-
-  template<typename _Tp>
-  inline _Tp&
-  valarray<_Tp>::operator[] (size_t __i)
-  { return _M_data[__i]; }
-
-} // std::
-      
-#include <bits/slice.h>
-#include <bits/slice_array.h>
-#include <bits/gslice.h>
-#include <bits/gslice_array.h>
-#include <bits/mask_array.h>
-#include <bits/indirect_array.h>
-
-namespace std
-{
-  template<typename _Tp>
-  inline valarray<_Tp>::valarray () : _M_size (0), _M_data (0) {}
-
-  template<typename _Tp>
-  inline valarray<_Tp>::valarray (size_t __n) 
-      : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
-  { __valarray_default_construct(_M_data, _M_data + __n); }
-
-  template<typename _Tp>
-  inline valarray<_Tp>::valarray (const _Tp& __t, size_t __n)
-    : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
-  { __valarray_fill_construct (_M_data, _M_data + __n, __t); }
-
-  template<typename _Tp>
-  inline valarray<_Tp>::valarray (const _Tp* __restrict__ __p, size_t __n)
-    : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
-  { __valarray_copy_construct (__p, __p + __n, _M_data); }
-
-  template<typename _Tp>
-  inline valarray<_Tp>::valarray (const valarray<_Tp>& __v)
-    : _M_size(__v._M_size), _M_data(__valarray_get_storage<_Tp>(__v._M_size))
-  { __valarray_copy_construct (__v._M_data, __v._M_data + _M_size, _M_data); }
-
-  template<typename _Tp>
-  inline valarray<_Tp>::valarray (const slice_array<_Tp>& __sa)
-    : _M_size(__sa._M_sz), _M_data(__valarray_get_storage<_Tp>(__sa._M_sz))
-  {
-    __valarray_copy
-      (__sa._M_array, __sa._M_sz, __sa._M_stride, _Array<_Tp>(_M_data));
-  }
-
-  template<typename _Tp>
-  inline valarray<_Tp>::valarray (const gslice_array<_Tp>& __ga)
-    : _M_size(__ga._M_index.size()),
-      _M_data(__valarray_get_storage<_Tp>(_M_size))
-  {
-    __valarray_copy
-      (__ga._M_array, _Array<size_t>(__ga._M_index),
-       _Array<_Tp>(_M_data), _M_size);
-  }
-
-  template<typename _Tp>
-  inline valarray<_Tp>::valarray (const mask_array<_Tp>& __ma)
-    : _M_size(__ma._M_sz), _M_data(__valarray_get_storage<_Tp>(__ma._M_sz))
-  {
-    __valarray_copy
-      (__ma._M_array, __ma._M_mask, _Array<_Tp>(_M_data), _M_size);
-  }
-
-  template<typename _Tp>
-  inline valarray<_Tp>::valarray (const indirect_array<_Tp>& __ia)
-    : _M_size(__ia._M_sz), _M_data(__valarray_get_storage<_Tp>(__ia._M_sz))
-  {
-    __valarray_copy
-      (__ia._M_array, __ia._M_index, _Array<_Tp>(_M_data), _M_size);
-  }
-
-  template<typename _Tp> template<class _Dom>
-  inline valarray<_Tp>::valarray (const _Expr<_Dom, _Tp>& __e)
-    : _M_size(__e.size ()), _M_data(__valarray_get_storage<_Tp>(_M_size))
-  { __valarray_copy (__e, _M_size, _Array<_Tp>(_M_data)); }
-
-  template<typename _Tp>
-  inline valarray<_Tp>::~valarray ()
-  {
-      __valarray_destroy_elements(_M_data, _M_data + _M_size);
-      __valarray_release_memory(_M_data);
-  }
-
-  template<typename _Tp>
-  inline valarray<_Tp>&
-  valarray<_Tp>::operator= (const valarray<_Tp>& __v)
-  {
-      __valarray_copy(__v._M_data, _M_size, _M_data);
-      return *this;
-  }
-
-  template<typename _Tp>
-  inline valarray<_Tp>&
-  valarray<_Tp>::operator= (const _Tp& __t)
-  {
-      __valarray_fill (_M_data, _M_size, __t);
-      return *this;
-  }
-
-  template<typename _Tp>
-  inline valarray<_Tp>&
-  valarray<_Tp>::operator= (const slice_array<_Tp>& __sa)
-  {
-      __valarray_copy (__sa._M_array, __sa._M_sz,
-              __sa._M_stride, _Array<_Tp>(_M_data));
-      return *this;
-  }
-
-  template<typename _Tp>
-  inline valarray<_Tp>&
-  valarray<_Tp>::operator= (const gslice_array<_Tp>& __ga)
-  {
-      __valarray_copy (__ga._M_array, _Array<size_t>(__ga._M_index),
-              _Array<_Tp>(_M_data), _M_size);
-      return *this;
-  }
-
-  template<typename _Tp>
-  inline valarray<_Tp>&
-  valarray<_Tp>::operator= (const mask_array<_Tp>& __ma)
-  {
-      __valarray_copy (__ma._M_array, __ma._M_mask,
-              _Array<_Tp>(_M_data), _M_size);
-      return *this;
-  }
-
-  template<typename _Tp>
-  inline valarray<_Tp>&
-  valarray<_Tp>::operator= (const indirect_array<_Tp>& __ia)
-  {
-      __valarray_copy (__ia._M_array, __ia._M_index,
-               _Array<_Tp>(_M_data), _M_size);
-      return *this;
-  }
-
-  template<typename _Tp> template<class _Dom>
-  inline valarray<_Tp>&
-  valarray<_Tp>::operator= (const _Expr<_Dom, _Tp>& __e)
-  {
-      __valarray_copy (__e, _M_size, _Array<_Tp>(_M_data));
-      return *this;
-  }
-
-  template<typename _Tp>
-  inline _Expr<_SClos<_ValArray,_Tp>, _Tp>
-  valarray<_Tp>::operator[] (slice __s) const
-  {
-      typedef _SClos<_ValArray,_Tp> _Closure;
-      return _Expr<_Closure, _Tp> (_Closure (_Array<_Tp>(_M_data), __s));
-  }
-
-  template<typename _Tp>
-  inline slice_array<_Tp>
-  valarray<_Tp>::operator[] (slice __s)
-  {
-      return slice_array<_Tp> (_Array<_Tp>(_M_data), __s);
-  }
-
-  template<typename _Tp>
-  inline _Expr<_GClos<_ValArray,_Tp>, _Tp>
-  valarray<_Tp>::operator[] (const gslice& __gs) const
-  {
-      typedef _GClos<_ValArray,_Tp> _Closure;
-      return _Expr<_Closure, _Tp>
-          (_Closure (_Array<_Tp>(_M_data), __gs._M_index->_M_index));
-  }
-
-  template<typename _Tp>
-  inline gslice_array<_Tp>
-  valarray<_Tp>::operator[] (const gslice& __gs)
-  {
-      return gslice_array<_Tp>
-          (_Array<_Tp>(_M_data), __gs._M_index->_M_index);
-  }
-
-  template<typename _Tp>
-  inline valarray<_Tp>
-  valarray<_Tp>::operator[] (const valarray<bool>& __m) const
-  {
-      size_t __s (0);
-      size_t __e (__m.size ());
-      for (size_t __i=0; __i<__e; ++__i)
-          if (__m[__i]) ++__s;
-      return valarray<_Tp> (mask_array<_Tp> (_Array<_Tp>(_M_data), __s,
-                                         _Array<bool> (__m)));
-  }
-
-  template<typename _Tp>
-  inline mask_array<_Tp>
-  valarray<_Tp>::operator[] (const valarray<bool>& __m)
-  {
-      size_t __s (0);
-      size_t __e (__m.size ());
-      for (size_t __i=0; __i<__e; ++__i)
-          if (__m[__i]) ++__s;
-      return mask_array<_Tp> (_Array<_Tp>(_M_data), __s, _Array<bool> (__m));
-  }
-
-  template<typename _Tp>
-  inline _Expr<_IClos<_ValArray,_Tp>, _Tp>
-  valarray<_Tp>::operator[] (const valarray<size_t>& __i) const
-  {
-      typedef _IClos<_ValArray,_Tp> _Closure;
-      return _Expr<_Closure, _Tp> (_Closure (*this, __i));
-  }
-
-  template<typename _Tp>
-  inline indirect_array<_Tp>
-  valarray<_Tp>::operator[] (const valarray<size_t>& __i)
-  {
-      return indirect_array<_Tp> (_Array<_Tp>(_M_data), __i.size(),
-                                _Array<size_t> (__i));
-  }
-
-  template<class _Tp>
-  inline size_t valarray<_Tp>::size () const { return _M_size; }
-
-  template<class _Tp>
-  inline _Tp
-  valarray<_Tp>::sum () const
-  {
-      return __valarray_sum(_M_data, _M_data + _M_size);
-  }
-
-//   template<typename _Tp>
-//   inline _Tp
-//   valarray<_Tp>::product () const
-//   {
-//       return __valarray_product(_M_data, _M_data + _M_size);
-//   }
-
-  template <class _Tp>
-     inline valarray<_Tp>
-     valarray<_Tp>::shift(int __n) const
-     {
-       _Tp* const __a = static_cast<_Tp*>
-         (__builtin_alloca(sizeof(_Tp) * _M_size));
-       if (__n == 0)                          // no shift
-         __valarray_copy_construct(_M_data, _M_data + _M_size, __a);
-       else if (__n > 0)         // __n > 0: shift left
-         {                 
-           if (size_t(__n) > _M_size)
-             __valarray_default_construct(__a, __a + __n);
-           else
-             {
-               __valarray_copy_construct(_M_data+__n, _M_data + _M_size, __a);
-               __valarray_default_construct(__a+_M_size-__n, __a + _M_size);
-             }
-         }
-       else                        // __n < 0: shift right
-         {                          
-           __valarray_copy_construct (_M_data, _M_data+_M_size+__n, __a-__n);
-           __valarray_default_construct(__a, __a - __n);
-         }
-       return valarray<_Tp> (__a, _M_size);
-     }
-
-  template <class _Tp>
-     inline valarray<_Tp>
-     valarray<_Tp>::cshift (int __n) const
-     {
-       _Tp* const __a = static_cast<_Tp*>
-         (__builtin_alloca (sizeof(_Tp) * _M_size));
-       if (__n == 0)               // no cshift
-         __valarray_copy_construct(_M_data, _M_data + _M_size, __a);
-       else if (__n > 0)           // cshift left
-         {               
-           __valarray_copy_construct(_M_data, _M_data+__n, __a+_M_size-__n);
-           __valarray_copy_construct(_M_data+__n, _M_data + _M_size, __a);
-         }
-       else                        // cshift right
-         {                       
-           __valarray_copy_construct
-             (_M_data + _M_size+__n, _M_data + _M_size, __a);
-           __valarray_copy_construct
-             (_M_data, _M_data + _M_size+__n, __a - __n);
-         }
-       return valarray<_Tp>(__a, _M_size);
-     }
-
-  template <class _Tp>
-  inline void
-  valarray<_Tp>::resize (size_t __n, _Tp __c)
-  {
-    // This complication is so to make valarray<valarray<T> > work
-    // even though it is not required by the standard.  Nobody should
-    // be saying valarray<valarray<T> > anyway.  See the specs.
-    __valarray_destroy_elements(_M_data, _M_data + _M_size);
-    if (_M_size != __n)
-      {
-        __valarray_release_memory(_M_data);
-        _M_size = __n;
-        _M_data = __valarray_get_storage<_Tp>(__n);
-      }
-    __valarray_fill_construct(_M_data, _M_data + __n, __c);
-  }
-    
-  template<typename _Tp>
-  inline _Tp
-  valarray<_Tp>::min() const
-  {
-      return *min_element (_M_data, _M_data+_M_size);
-  }
-
-  template<typename _Tp>
-  inline _Tp
-  valarray<_Tp>::max() const
-  {
-      return *max_element (_M_data, _M_data+_M_size);
-  }
-  
-  template<class _Tp>
-  inline _Expr<_ValFunClos<_ValArray,_Tp>,_Tp>
-  valarray<_Tp>::apply (_Tp func (_Tp)) const
-  {
-      typedef _ValFunClos<_ValArray,_Tp> _Closure;
-      return _Expr<_Closure,_Tp> (_Closure (*this, func));
-  }
-
-  template<class _Tp>
-  inline _Expr<_RefFunClos<_ValArray,_Tp>,_Tp>
-  valarray<_Tp>::apply (_Tp func (const _Tp &)) const
-  {
-      typedef _RefFunClos<_ValArray,_Tp> _Closure;
-      return _Expr<_Closure,_Tp> (_Closure (*this, func));
-  }
-
-#define _DEFINE_VALARRAY_UNARY_OPERATOR(_Op, _Name)                     \
-  template<typename _Tp>                                               \
-  inline _Expr<_UnClos<_Name,_ValArray,_Tp>, _Tp>                      \
-  valarray<_Tp>::operator _Op() const                                  \
-  {                                                                    \
-      typedef _UnClos<_Name,_ValArray,_Tp> _Closure;                   \
-      return _Expr<_Closure, _Tp> (_Closure (*this));                  \
-  }
-
-    _DEFINE_VALARRAY_UNARY_OPERATOR(+, _Unary_plus)
-    _DEFINE_VALARRAY_UNARY_OPERATOR(-, negate)
-    _DEFINE_VALARRAY_UNARY_OPERATOR(~, _Bitwise_not)
-
-#undef _DEFINE_VALARRAY_UNARY_OPERATOR
-  
-  template<typename _Tp>
-  inline _Expr<_UnClos<logical_not,_ValArray,_Tp>, bool>
-  valarray<_Tp>::operator!() const
-  {
-      typedef _UnClos<logical_not,_ValArray,_Tp> _Closure;
-      return _Expr<_Closure, bool> (_Closure (*this));
-  }
-
-#define _DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(_Op, _Name)               \
-  template<class _Tp>                                                  \
-  inline valarray<_Tp> &                                               \
-  valarray<_Tp>::operator _Op##= (const _Tp &__t)                      \
-  {                                                                    \
-      _Array_augmented_##_Name (_Array<_Tp>(_M_data), _M_size, __t);   \
-      return *this;                                                    \
-  }                                                                    \
-                                                                       \
-  template<class _Tp>                                                  \
-  inline valarray<_Tp> &                                               \
-  valarray<_Tp>::operator _Op##= (const valarray<_Tp> &__v)            \
-  {                                                                    \
-      _Array_augmented_##_Name (_Array<_Tp>(_M_data), _M_size,                 \
-                               _Array<_Tp>(__v._M_data));              \
-      return *this;                                                    \
-  }
-
-_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(+, plus)
-_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(-, minus)
-_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(*, multiplies)
-_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(/, divides)
-_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(%, modulus)
-_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(^, xor)
-_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(&, and)
-_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(|, or)
-_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(<<, shift_left)
-_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(>>, shift_right)
-
-#undef _DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT
-
-
-} // std::
-  
-
-namespace std
-{
-
-#define _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(_Op, _Name)          \
-  template<class _Tp> template<class _Dom>                             \
-  inline valarray<_Tp> &                                               \
-  valarray<_Tp>::operator _Op##= (const _Expr<_Dom,_Tp> &__e)          \
-  {                                                                    \
-      _Array_augmented_##_Name (_Array<_Tp>(_M_data), __e, _M_size);   \
-      return *this;                                                    \
-  }
-
-_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(+, plus)
-_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(-, minus)
-_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(*, multiplies)
-_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(/, divides)
-_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(%, modulus)
-_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(^, xor)
-_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(&, and)
-_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(|, or)
-_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(<<, shift_left)
-_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(>>, shift_right)
-
-#undef _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT
-    
-
-#define _DEFINE_BINARY_OPERATOR(_Op, _Name)                            \
-  template<typename _Tp>                                               \
-  inline _Expr<_BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp>, _Tp>        \
-  operator _Op (const valarray<_Tp> &__v, const valarray<_Tp> &__w)    \
-  {                                                                    \
-      typedef _BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp> _Closure;     \
-      return _Expr<_Closure, _Tp> (_Closure (__v, __w));               \
-  }                                                                    \
-                                                                       \
-  template<typename _Tp>                                               \
-  inline _Expr<_BinClos<_Name,_ValArray,_Constant,_Tp,_Tp>,_Tp>         \
-  operator _Op (const valarray<_Tp> &__v, const _Tp &__t)              \
-  {                                                                    \
-      typedef _BinClos<_Name,_ValArray,_Constant,_Tp,_Tp> _Closure;    \
-      return _Expr<_Closure, _Tp> (_Closure (__v, __t));               \
-  }                                                                    \
-                                                                       \
-  template<typename _Tp>                                               \
-  inline _Expr<_BinClos<_Name,_Constant,_ValArray,_Tp,_Tp>,_Tp>         \
-  operator _Op (const _Tp &__t, const valarray<_Tp> &__v)              \
-  {                                                                    \
-      typedef _BinClos<_Name,_Constant,_ValArray,_Tp,_Tp> _Closure;     \
-      return _Expr<_Closure, _Tp> (_Closure (__t, __v));               \
-  }
-
-_DEFINE_BINARY_OPERATOR(+, plus)
-_DEFINE_BINARY_OPERATOR(-, minus)
-_DEFINE_BINARY_OPERATOR(*, multiplies)
-_DEFINE_BINARY_OPERATOR(/, divides)
-_DEFINE_BINARY_OPERATOR(%, modulus)
-_DEFINE_BINARY_OPERATOR(^, _Bitwise_xor)
-_DEFINE_BINARY_OPERATOR(&, _Bitwise_and)
-_DEFINE_BINARY_OPERATOR(|, _Bitwise_or)
-_DEFINE_BINARY_OPERATOR(<<, _Shift_left)
-_DEFINE_BINARY_OPERATOR(>>, _Shift_right)
-
-#undef _DEFINE_BINARY_OPERATOR
-
-#define _DEFINE_LOGICAL_OPERATOR(_Op, _Name)                           \
-  template<typename _Tp>                                               \
-  inline _Expr<_BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp>,bool>        \
-  operator _Op (const valarray<_Tp> &__v, const valarray<_Tp> &__w)    \
-  {                                                                    \
-      typedef _BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp> _Closure;     \
-      return _Expr<_Closure, bool> (_Closure (__v, __w));               \
-  }                                                                    \
-                                                                       \
-  template<class _Tp>                                                  \
-  inline _Expr<_BinClos<_Name,_ValArray,_Constant,_Tp,_Tp>,bool>        \
-  operator _Op (const valarray<_Tp> &__v, const _Tp &__t)              \
-  {                                                                    \
-      typedef _BinClos<_Name,_ValArray,_Constant,_Tp,_Tp> _Closure;     \
-      return _Expr<_Closure, bool> (_Closure (__v, __t));              \
-  }                                                                    \
-                                                                       \
-  template<class _Tp>                                                  \
-  inline _Expr<_BinClos<_Name,_Constant,_ValArray,_Tp,_Tp>,bool>        \
-  operator _Op (const _Tp &__t, const valarray<_Tp> &__v)              \
-  {                                                                    \
-      typedef _BinClos<_Name,_Constant,_ValArray,_Tp,_Tp> _Closure;     \
-      return _Expr<_Closure, bool> (_Closure (__t, __v));              \
-  }
-
-_DEFINE_LOGICAL_OPERATOR(&&, logical_and)
-_DEFINE_LOGICAL_OPERATOR(||, logical_or)
-_DEFINE_LOGICAL_OPERATOR(==, equal_to)
-_DEFINE_LOGICAL_OPERATOR(!=, not_equal_to)
-_DEFINE_LOGICAL_OPERATOR(<, less)
-_DEFINE_LOGICAL_OPERATOR(>, greater)
-_DEFINE_LOGICAL_OPERATOR(<=, less_equal)
-_DEFINE_LOGICAL_OPERATOR(>=, greater_equal)
-
-#undef _DEFINE_LOGICAL_OPERATOR
-
-} // namespace std
-
-#endif // _CPP_VALARRAY
-
-// Local Variables:
-// mode:c++
-// End:
diff --git a/libstdc++-v3/include/std/vector b/libstdc++-v3/include/std/vector
deleted file mode 100644 (file)
index 995daec..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-// <vector> -*- C++ -*-
-
-// Copyright (C) 2001 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-/** @file std_vector.h
- *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
- */
-
-#ifndef _CPP_VECTOR
-#define _CPP_VECTOR 1
-
-#pragma GCC system_header
-
-#include <bits/functexcept.h>
-#include <bits/stl_algobase.h>
-#include <bits/stl_alloc.h>
-#include <bits/stl_construct.h>
-#include <bits/stl_uninitialized.h>
-#include <bits/stl_vector.h>
-#include <bits/stl_bvector.h> 
-
-#endif /* _CPP_VECTOR */
-
-// Local Variables:
-// mode:C++
-// End: