From 54c1bf7801758caf2ff54917e79a8c239643061c Mon Sep 17 00:00:00 2001 From: Benjamin Kosnik Date: Fri, 4 Jan 2002 21:27:36 +0000 Subject: Makefile.am (std_headers): Remove cXXX from list. 2002-01-04 Benjamin Kosnik * include/Makefile.am (std_headers): Remove cXXX from list. (c_base_srcdir): No bits subdirectory. (c_base_builddir): Same. (c_base_headers): Adjust names, add ciso646. (bits_headers): Remove std_xxx.h headers. * include/Makefile.in: Regenerate. * include/ext/iterator: Adjust includes. * include/ext/ropeimpl.h: Same. * include/ext/stl_hash_fun.h: Same. * include/ext/algorithm: Same. * include/backward/bvector.h: Adjust includes. * include/backward/vector.h: Same. * include/backward/strstream: Same. * include/backward/streambuf.h: Same. * include/backward/stack.h: Same. * include/backward/set.h: Same. * include/backward/queue.h: Same. * include/backward/multiset.h: Same. * include/backward/multimap.h: Same. * include/backward/map.h: Same. * include/backward/list.h: Same. * include/backward/iterator.h: Same. * include/backward/iostream.h: Same. * include/backward/iomanip.h: Same. * include/backward/fstream.h: Same. * include/backward/deque.h: Same. * include/backward/complex.h: Same. * include/bits/std_algorithm.h: Move to... * include/std/algorithm: ...here. * include/bits/std_iosfwd.h, std_locale.h, std_stack.h, std_bitset.h, std_ios.h, std_map.h, std_stdexcept.h, std_complex.h, std_iostream.h, std_memory.h, std_streambuf.h, std_deque.h, std_istream.h, std_numeric.h, std_string.h, std_fstream.h, std_ostream.h, std_utility.h, std_iterator.h, std_queue.h, std_valarray.h, std_functional.h, std_limits.h, std_set.h, std_vector.h, std_iomanip.h, std_list.h, std_sstream.h: Same. * include/c_std/bits/std_cassert.h: Move to... * include/c_std/cassert: Here. * include/c_std/std_cctype.h, std_cerrno.h, std_cfloat.h, std_climits.h, std_clocale.h, std_cmath.h, std_csetjmp.h, std_csignal.h, std_cstdarg.h, std_cstddef.h, std_cstdio.h, std_cstdlib.h, std_cstring.h, std_ctime.h, std_cwchar.h, std_cwctype.h: Same. * include/c_std/cmath: Adjust cmath.tcc include. * include/c_std/cstdlib: Adjust includes. * include/c_std/cwchar: Same. * include/c_std/ctime: Same. * include/c_std/cstring: Same. * include/c_std/cstdio: Same. * include/c_std/bits: Remove directory. * include/c/bits/std_cassert.h: Move to... * include/c/cassert: Here. * include/c/std_cctype.h, std_cerrno.h, std_cfloat.h, std_climits.h, std_clocale.h, std_cmath.h, std_csetjmp.h, std_csignal.h, std_cstdarg.h, std_cstddef.h, std_cstdio.h, std_cstdlib.h, std_cstring.h, std_ctime.h, std_cwchar.h, std_cwctype.h: Same. * include/c/bits: Remove directory. * include/std/cwctype: Remove. * include/std/cwchar: Remove. * include/std/ctime: Remove. * include/std/cstring: Remove. * include/std/cstdlib: Remove. * include/std/cstdio: Remove. * include/std/cstddef: Remove. * include/std/cstdarg: Remove. * include/std/csignal: Remove. * include/std/csetjmp: Remove. * include/std/cmath: Remove. * include/std/clocale: Remove. * include/std/climits: Remove. * include/std/ciso646: Remove. * include/std/cfloat: Remove. * include/std/cerrno: Remove. * include/std/cctype: Remove. * include/std/cassert: Remove. * include/bits/fpos.h: Adjust includes, removing files and subsituting <.xxx> * include/bits/valarray_array.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_alloc.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/sstream.tcc: Same. * include/bits/pthread_allocimpl.h: Same. * include/bits/ostream.tcc: Same. * include/bits/localefwd.h: Same. * include/bits/locale_facets.tcc: Same. * include/bits/locale_facets.h: Same. * include/bits/istream.tcc: Same. * include/bits/char_traits.h: Same. * include/bits/boost_concept_check.h: Same. * include/bits/basic_file.h: Same. * include/std/bitset: Same. * include/std/complex: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/ios: Same. * include/std/iostream: Same. * include/std/ostream: Same. * include/std/sstream: Same. * include/std/streambuf: Same. * include/std/string: Same. * include/std/iterator: Same. * include/std/valarray: Same. * src/ios.cc: Adjust includes. * src/valarray-inst.cc: Same. * src/string-inst.cc: Same. * src/stl-inst.cc: Same. * src/stdexcept.cc: Same. * src/misc-inst.cc: Same. * src/localename.cc: Same. * src/locale-inst.cc: Same. * src/locale.cc: Same. * src/limits.cc: Same. * src/concept-inst.cc: Same. * src/complex_io.cc: Same. * src/codecvt.cc: Same. * src/bitset.cc: Same. * src/cmath.cc: Same. From-SVN: r48544 --- libstdc++-v3/ChangeLog | 133 +- libstdc++-v3/configure | 59 +- libstdc++-v3/include/Makefile.am | 88 +- libstdc++-v3/include/Makefile.in | 268 ++- libstdc++-v3/include/backward/bvector.h | 4 +- libstdc++-v3/include/backward/complex.h | 2 +- libstdc++-v3/include/backward/deque.h | 2 +- libstdc++-v3/include/backward/fstream.h | 2 +- libstdc++-v3/include/backward/iomanip.h | 2 +- libstdc++-v3/include/backward/iostream.h | 2 +- libstdc++-v3/include/backward/iterator.h | 2 +- libstdc++-v3/include/backward/list.h | 2 +- libstdc++-v3/include/backward/map.h | 2 +- libstdc++-v3/include/backward/multimap.h | 2 +- libstdc++-v3/include/backward/multiset.h | 2 +- libstdc++-v3/include/backward/queue.h | 2 +- libstdc++-v3/include/backward/set.h | 2 +- libstdc++-v3/include/backward/stack.h | 2 +- libstdc++-v3/include/backward/streambuf.h | 2 +- libstdc++-v3/include/backward/strstream | 10 +- libstdc++-v3/include/backward/vector.h | 2 +- libstdc++-v3/include/bits/basic_file.h | 2 +- libstdc++-v3/include/bits/boost_concept_check.h | 2 +- libstdc++-v3/include/bits/char_traits.h | 2 +- libstdc++-v3/include/bits/fpos.h | 5 +- libstdc++-v3/include/bits/istream.tcc | 4 +- libstdc++-v3/include/bits/locale_facets.h | 6 +- libstdc++-v3/include/bits/locale_facets.tcc | 16 +- libstdc++-v3/include/bits/localefwd.h | 6 +- libstdc++-v3/include/bits/ostream.tcc | 2 +- libstdc++-v3/include/bits/pthread_allocimpl.h | 2 +- libstdc++-v3/include/bits/sstream.tcc | 2 +- libstdc++-v3/include/bits/std_algorithm.h | 76 - libstdc++-v3/include/bits/std_bitset.h | 814 --------- libstdc++-v3/include/bits/std_complex.h | 1058 ------------ libstdc++-v3/include/bits/std_deque.h | 77 - libstdc++-v3/include/bits/std_fstream.h | 434 ----- libstdc++-v3/include/bits/std_functional.h | 62 - libstdc++-v3/include/bits/std_iomanip.h | 221 --- libstdc++-v3/include/bits/std_ios.h | 54 - libstdc++-v3/include/bits/std_iosfwd.h | 136 -- libstdc++-v3/include/bits/std_iostream.h | 65 - libstdc++-v3/include/bits/std_istream.h | 299 ---- libstdc++-v3/include/bits/std_iterator.h | 79 - libstdc++-v3/include/bits/std_limits.h | 2017 ----------------------- libstdc++-v3/include/bits/std_list.h | 77 - libstdc++-v3/include/bits/std_locale.h | 52 - libstdc++-v3/include/bits/std_map.h | 74 - libstdc++-v3/include/bits/std_memory.h | 149 -- libstdc++-v3/include/bits/std_numeric.h | 75 - libstdc++-v3/include/bits/std_ostream.h | 288 ---- libstdc++-v3/include/bits/std_queue.h | 81 - libstdc++-v3/include/bits/std_set.h | 74 - libstdc++-v3/include/bits/std_sstream.h | 372 ----- libstdc++-v3/include/bits/std_stack.h | 77 - libstdc++-v3/include/bits/std_stdexcept.h | 150 -- libstdc++-v3/include/bits/std_streambuf.h | 540 ------ libstdc++-v3/include/bits/std_string.h | 60 - libstdc++-v3/include/bits/std_utility.h | 73 - libstdc++-v3/include/bits/std_valarray.h | 742 --------- libstdc++-v3/include/bits/std_vector.h | 78 - libstdc++-v3/include/bits/stl_algobase.h | 16 +- libstdc++-v3/include/bits/stl_alloc.h | 11 +- libstdc++-v3/include/bits/stl_uninitialized.h | 2 +- libstdc++-v3/include/bits/valarray_array.h | 4 +- libstdc++-v3/include/c/bits/std_cassert.h | 39 - libstdc++-v3/include/c/bits/std_cctype.h | 42 - libstdc++-v3/include/c/bits/std_cerrno.h | 42 - libstdc++-v3/include/c/bits/std_cfloat.h | 42 - libstdc++-v3/include/c/bits/std_climits.h | 42 - libstdc++-v3/include/c/bits/std_clocale.h | 42 - libstdc++-v3/include/c/bits/std_cmath.h | 42 - libstdc++-v3/include/c/bits/std_csetjmp.h | 42 - libstdc++-v3/include/c/bits/std_csignal.h | 42 - libstdc++-v3/include/c/bits/std_cstdarg.h | 42 - libstdc++-v3/include/c/bits/std_cstddef.h | 42 - libstdc++-v3/include/c/bits/std_cstdio.h | 42 - libstdc++-v3/include/c/bits/std_cstdlib.h | 42 - libstdc++-v3/include/c/bits/std_cstring.h | 42 - libstdc++-v3/include/c/bits/std_ctime.h | 42 - libstdc++-v3/include/c/bits/std_cwchar.h | 42 - libstdc++-v3/include/c/bits/std_cwctype.h | 42 - libstdc++-v3/include/c/cassert | 39 + libstdc++-v3/include/c/cctype | 42 + libstdc++-v3/include/c/cerrno | 42 + libstdc++-v3/include/c/cfloat | 42 + libstdc++-v3/include/c/ciso646 | 38 + libstdc++-v3/include/c/climits | 42 + libstdc++-v3/include/c/clocale | 42 + libstdc++-v3/include/c/cmath | 42 + libstdc++-v3/include/c/csetjmp | 42 + libstdc++-v3/include/c/csignal | 42 + libstdc++-v3/include/c/cstdarg | 42 + libstdc++-v3/include/c/cstddef | 42 + libstdc++-v3/include/c/cstdio | 42 + libstdc++-v3/include/c/cstdlib | 42 + libstdc++-v3/include/c/cstring | 42 + libstdc++-v3/include/c/ctime | 42 + libstdc++-v3/include/c/cwchar | 42 + libstdc++-v3/include/c/cwctype | 42 + libstdc++-v3/include/c_std/bits/cmath.tcc | 54 - libstdc++-v3/include/c_std/bits/std_cassert.h | 47 - libstdc++-v3/include/c_std/bits/std_cctype.h | 72 - libstdc++-v3/include/c_std/bits/std_cerrno.h | 45 - libstdc++-v3/include/c_std/bits/std_cfloat.h | 40 - libstdc++-v3/include/c_std/bits/std_climits.h | 40 - libstdc++-v3/include/c_std/bits/std_clocale.h | 51 - libstdc++-v3/include/c_std/bits/std_cmath.h | 656 -------- libstdc++-v3/include/c_std/bits/std_csetjmp.h | 54 - libstdc++-v3/include/c_std/bits/std_csignal.h | 50 - libstdc++-v3/include/c_std/bits/std_cstdarg.h | 50 - libstdc++-v3/include/c_std/bits/std_cstddef.h | 46 - libstdc++-v3/include/c_std/bits/std_cstdio.h | 161 -- libstdc++-v3/include/c_std/bits/std_cstdlib.h | 167 -- libstdc++-v3/include/c_std/bits/std_cstring.h | 117 -- libstdc++-v3/include/c_std/bits/std_ctime.h | 70 - libstdc++-v3/include/c_std/bits/std_cwchar.h | 232 --- libstdc++-v3/include/c_std/bits/std_cwctype.h | 89 - libstdc++-v3/include/c_std/cassert | 47 + libstdc++-v3/include/c_std/cctype | 72 + libstdc++-v3/include/c_std/cerrno | 45 + libstdc++-v3/include/c_std/cfloat | 40 + libstdc++-v3/include/c_std/ciso646 | 38 + libstdc++-v3/include/c_std/climits | 40 + libstdc++-v3/include/c_std/clocale | 51 + libstdc++-v3/include/c_std/cmath | 656 ++++++++ libstdc++-v3/include/c_std/cmath.tcc | 54 + libstdc++-v3/include/c_std/csetjmp | 54 + libstdc++-v3/include/c_std/csignal | 50 + libstdc++-v3/include/c_std/cstdarg | 50 + libstdc++-v3/include/c_std/cstddef | 46 + libstdc++-v3/include/c_std/cstdio | 161 ++ libstdc++-v3/include/c_std/cstdlib | 167 ++ libstdc++-v3/include/c_std/cstring | 117 ++ libstdc++-v3/include/c_std/ctime | 70 + libstdc++-v3/include/c_std/cwchar | 232 +++ libstdc++-v3/include/c_std/cwctype | 89 + libstdc++-v3/include/ext/algorithm | 2 +- libstdc++-v3/include/ext/functional | 2 +- libstdc++-v3/include/ext/iterator | 2 +- libstdc++-v3/include/ext/memory | 2 +- libstdc++-v3/include/ext/numeric | 2 +- libstdc++-v3/include/ext/ropeimpl.h | 4 +- libstdc++-v3/include/ext/stl_hash_fun.h | 2 +- libstdc++-v3/include/std/algorithm | 51 +- libstdc++-v3/include/std/bitset | 791 ++++++++- libstdc++-v3/include/std/cassert | 41 - libstdc++-v3/include/std/cctype | 41 - libstdc++-v3/include/std/cerrno | 41 - libstdc++-v3/include/std/cfloat | 41 - libstdc++-v3/include/std/ciso646 | 38 - libstdc++-v3/include/std/climits | 41 - libstdc++-v3/include/std/clocale | 41 - libstdc++-v3/include/std/cmath | 41 - libstdc++-v3/include/std/complex | 1033 +++++++++++- libstdc++-v3/include/std/csetjmp | 41 - libstdc++-v3/include/std/csignal | 41 - libstdc++-v3/include/std/cstdarg | 41 - libstdc++-v3/include/std/cstddef | 41 - libstdc++-v3/include/std/cstdio | 41 - libstdc++-v3/include/std/cstdlib | 41 - libstdc++-v3/include/std/cstring | 41 - libstdc++-v3/include/std/ctime | 41 - libstdc++-v3/include/std/cwchar | 41 - libstdc++-v3/include/std/cwctype | 41 - libstdc++-v3/include/std/deque | 52 +- libstdc++-v3/include/std/fstream | 409 ++++- libstdc++-v3/include/std/functional | 37 +- libstdc++-v3/include/std/iomanip | 198 ++- libstdc++-v3/include/std/ios | 31 +- libstdc++-v3/include/std/iosfwd | 111 +- libstdc++-v3/include/std/iostream | 38 +- libstdc++-v3/include/std/istream | 274 ++- libstdc++-v3/include/std/iterator | 54 +- libstdc++-v3/include/std/limits | 1994 +++++++++++++++++++++- libstdc++-v3/include/std/list | 52 +- libstdc++-v3/include/std/locale | 27 +- libstdc++-v3/include/std/map | 49 +- libstdc++-v3/include/std/memory | 124 +- libstdc++-v3/include/std/numeric | 50 +- libstdc++-v3/include/std/ostream | 263 ++- libstdc++-v3/include/std/queue | 56 +- libstdc++-v3/include/std/set | 49 +- libstdc++-v3/include/std/sstream | 347 +++- libstdc++-v3/include/std/stack | 52 +- libstdc++-v3/include/std/stdexcept | 125 +- libstdc++-v3/include/std/streambuf | 515 +++++- libstdc++-v3/include/std/string | 35 +- libstdc++-v3/include/std/utility | 48 +- libstdc++-v3/include/std/valarray | 719 +++++++- libstdc++-v3/include/std/vector | 53 +- libstdc++-v3/src/bitset.cc | 2 +- libstdc++-v3/src/cmath.cc | 3 +- libstdc++-v3/src/codecvt.cc | 2 +- libstdc++-v3/src/complex_io.cc | 5 +- libstdc++-v3/src/concept-inst.cc | 9 +- libstdc++-v3/src/ios.cc | 8 +- libstdc++-v3/src/limits.cc | 2 +- libstdc++-v3/src/locale-inst.cc | 19 +- libstdc++-v3/src/locale.cc | 24 +- libstdc++-v3/src/localename.cc | 10 +- libstdc++-v3/src/misc-inst.cc | 26 +- libstdc++-v3/src/stdexcept.cc | 4 +- libstdc++-v3/src/stl-inst.cc | 8 +- libstdc++-v3/src/string-inst.cc | 2 +- libstdc++-v3/src/valarray-inst.cc | 2 +- 206 files changed, 10712 insertions(+), 12410 deletions(-) delete mode 100644 libstdc++-v3/include/bits/std_algorithm.h delete mode 100644 libstdc++-v3/include/bits/std_bitset.h delete mode 100644 libstdc++-v3/include/bits/std_complex.h delete mode 100644 libstdc++-v3/include/bits/std_deque.h delete mode 100644 libstdc++-v3/include/bits/std_fstream.h delete mode 100644 libstdc++-v3/include/bits/std_functional.h delete mode 100644 libstdc++-v3/include/bits/std_iomanip.h delete mode 100644 libstdc++-v3/include/bits/std_ios.h delete mode 100644 libstdc++-v3/include/bits/std_iosfwd.h delete mode 100644 libstdc++-v3/include/bits/std_iostream.h delete mode 100644 libstdc++-v3/include/bits/std_istream.h delete mode 100644 libstdc++-v3/include/bits/std_iterator.h delete mode 100644 libstdc++-v3/include/bits/std_limits.h delete mode 100644 libstdc++-v3/include/bits/std_list.h delete mode 100644 libstdc++-v3/include/bits/std_locale.h delete mode 100644 libstdc++-v3/include/bits/std_map.h delete mode 100644 libstdc++-v3/include/bits/std_memory.h delete mode 100644 libstdc++-v3/include/bits/std_numeric.h delete mode 100644 libstdc++-v3/include/bits/std_ostream.h delete mode 100644 libstdc++-v3/include/bits/std_queue.h delete mode 100644 libstdc++-v3/include/bits/std_set.h delete mode 100644 libstdc++-v3/include/bits/std_sstream.h delete mode 100644 libstdc++-v3/include/bits/std_stack.h delete mode 100644 libstdc++-v3/include/bits/std_stdexcept.h delete mode 100644 libstdc++-v3/include/bits/std_streambuf.h delete mode 100644 libstdc++-v3/include/bits/std_string.h delete mode 100644 libstdc++-v3/include/bits/std_utility.h delete mode 100644 libstdc++-v3/include/bits/std_valarray.h delete mode 100644 libstdc++-v3/include/bits/std_vector.h delete mode 100644 libstdc++-v3/include/c/bits/std_cassert.h delete mode 100644 libstdc++-v3/include/c/bits/std_cctype.h delete mode 100644 libstdc++-v3/include/c/bits/std_cerrno.h delete mode 100644 libstdc++-v3/include/c/bits/std_cfloat.h delete mode 100644 libstdc++-v3/include/c/bits/std_climits.h delete mode 100644 libstdc++-v3/include/c/bits/std_clocale.h delete mode 100644 libstdc++-v3/include/c/bits/std_cmath.h delete mode 100644 libstdc++-v3/include/c/bits/std_csetjmp.h delete mode 100644 libstdc++-v3/include/c/bits/std_csignal.h delete mode 100644 libstdc++-v3/include/c/bits/std_cstdarg.h delete mode 100644 libstdc++-v3/include/c/bits/std_cstddef.h delete mode 100644 libstdc++-v3/include/c/bits/std_cstdio.h delete mode 100644 libstdc++-v3/include/c/bits/std_cstdlib.h delete mode 100644 libstdc++-v3/include/c/bits/std_cstring.h delete mode 100644 libstdc++-v3/include/c/bits/std_ctime.h delete mode 100644 libstdc++-v3/include/c/bits/std_cwchar.h delete mode 100644 libstdc++-v3/include/c/bits/std_cwctype.h create mode 100644 libstdc++-v3/include/c/cassert create mode 100644 libstdc++-v3/include/c/cctype create mode 100644 libstdc++-v3/include/c/cerrno create mode 100644 libstdc++-v3/include/c/cfloat create mode 100644 libstdc++-v3/include/c/ciso646 create mode 100644 libstdc++-v3/include/c/climits create mode 100644 libstdc++-v3/include/c/clocale create mode 100644 libstdc++-v3/include/c/cmath create mode 100644 libstdc++-v3/include/c/csetjmp create mode 100644 libstdc++-v3/include/c/csignal create mode 100644 libstdc++-v3/include/c/cstdarg create mode 100644 libstdc++-v3/include/c/cstddef create mode 100644 libstdc++-v3/include/c/cstdio create mode 100644 libstdc++-v3/include/c/cstdlib create mode 100644 libstdc++-v3/include/c/cstring create mode 100644 libstdc++-v3/include/c/ctime create mode 100644 libstdc++-v3/include/c/cwchar create mode 100644 libstdc++-v3/include/c/cwctype delete mode 100644 libstdc++-v3/include/c_std/bits/cmath.tcc delete mode 100644 libstdc++-v3/include/c_std/bits/std_cassert.h delete mode 100644 libstdc++-v3/include/c_std/bits/std_cctype.h delete mode 100644 libstdc++-v3/include/c_std/bits/std_cerrno.h delete mode 100644 libstdc++-v3/include/c_std/bits/std_cfloat.h delete mode 100644 libstdc++-v3/include/c_std/bits/std_climits.h delete mode 100644 libstdc++-v3/include/c_std/bits/std_clocale.h delete mode 100644 libstdc++-v3/include/c_std/bits/std_cmath.h delete mode 100644 libstdc++-v3/include/c_std/bits/std_csetjmp.h delete mode 100644 libstdc++-v3/include/c_std/bits/std_csignal.h delete mode 100644 libstdc++-v3/include/c_std/bits/std_cstdarg.h delete mode 100644 libstdc++-v3/include/c_std/bits/std_cstddef.h delete mode 100644 libstdc++-v3/include/c_std/bits/std_cstdio.h delete mode 100644 libstdc++-v3/include/c_std/bits/std_cstdlib.h delete mode 100644 libstdc++-v3/include/c_std/bits/std_cstring.h delete mode 100644 libstdc++-v3/include/c_std/bits/std_ctime.h delete mode 100644 libstdc++-v3/include/c_std/bits/std_cwchar.h delete mode 100644 libstdc++-v3/include/c_std/bits/std_cwctype.h create mode 100644 libstdc++-v3/include/c_std/cassert create mode 100644 libstdc++-v3/include/c_std/cctype create mode 100644 libstdc++-v3/include/c_std/cerrno create mode 100644 libstdc++-v3/include/c_std/cfloat create mode 100644 libstdc++-v3/include/c_std/ciso646 create mode 100644 libstdc++-v3/include/c_std/climits create mode 100644 libstdc++-v3/include/c_std/clocale create mode 100644 libstdc++-v3/include/c_std/cmath create mode 100644 libstdc++-v3/include/c_std/cmath.tcc create mode 100644 libstdc++-v3/include/c_std/csetjmp create mode 100644 libstdc++-v3/include/c_std/csignal create mode 100644 libstdc++-v3/include/c_std/cstdarg create mode 100644 libstdc++-v3/include/c_std/cstddef create mode 100644 libstdc++-v3/include/c_std/cstdio create mode 100644 libstdc++-v3/include/c_std/cstdlib create mode 100644 libstdc++-v3/include/c_std/cstring create mode 100644 libstdc++-v3/include/c_std/ctime create mode 100644 libstdc++-v3/include/c_std/cwchar create mode 100644 libstdc++-v3/include/c_std/cwctype delete mode 100644 libstdc++-v3/include/std/cassert delete mode 100644 libstdc++-v3/include/std/cctype delete mode 100644 libstdc++-v3/include/std/cerrno delete mode 100644 libstdc++-v3/include/std/cfloat delete mode 100644 libstdc++-v3/include/std/ciso646 delete mode 100644 libstdc++-v3/include/std/climits delete mode 100644 libstdc++-v3/include/std/clocale delete mode 100644 libstdc++-v3/include/std/cmath delete mode 100644 libstdc++-v3/include/std/csetjmp delete mode 100644 libstdc++-v3/include/std/csignal delete mode 100644 libstdc++-v3/include/std/cstdarg delete mode 100644 libstdc++-v3/include/std/cstddef delete mode 100644 libstdc++-v3/include/std/cstdio delete mode 100644 libstdc++-v3/include/std/cstdlib delete mode 100644 libstdc++-v3/include/std/cstring delete mode 100644 libstdc++-v3/include/std/ctime delete mode 100644 libstdc++-v3/include/std/cwchar delete mode 100644 libstdc++-v3/include/std/cwctype diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 776bbfe..5dbf8df 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,134 @@ +2002-01-04 Benjamin Kosnik + + * include/Makefile.am (std_headers): Remove cXXX from list. + (c_base_srcdir): No bits subdirectory. + (c_base_builddir): Same. + (c_base_headers): Adjust names, add ciso646. + (bits_headers): Remove std_xxx.h headers. + * include/Makefile.in: Regenerate. + + * include/ext/iterator: Adjust includes. + * include/ext/ropeimpl.h: Same. + * include/ext/stl_hash_fun.h: Same. + * include/ext/algorithm: Same. + + * include/backward/bvector.h: Adjust includes. + * include/backward/vector.h: Same. + * include/backward/strstream: Same. + * include/backward/streambuf.h: Same. + * include/backward/stack.h: Same. + * include/backward/set.h: Same. + * include/backward/queue.h: Same. + * include/backward/multiset.h: Same. + * include/backward/multimap.h: Same. + * include/backward/map.h: Same. + * include/backward/list.h: Same. + * include/backward/iterator.h: Same. + * include/backward/iostream.h: Same. + * include/backward/iomanip.h: Same. + * include/backward/fstream.h: Same. + * include/backward/deque.h: Same. + * include/backward/complex.h: Same. + + * include/bits/std_algorithm.h: Move to... + * include/std/algorithm: ...here. + * include/bits/std_iosfwd.h, std_locale.h, std_stack.h, + std_bitset.h, std_ios.h, std_map.h, std_stdexcept.h, + std_complex.h, std_iostream.h, std_memory.h, std_streambuf.h, + std_deque.h, std_istream.h, std_numeric.h, std_string.h, + std_fstream.h, std_ostream.h, std_utility.h, std_iterator.h, + std_queue.h, std_valarray.h, std_functional.h, std_limits.h, + std_set.h, std_vector.h, std_iomanip.h, std_list.h, std_sstream.h: + Same. + + * include/c_std/bits/std_cassert.h: Move to... + * include/c_std/cassert: Here. + * include/c_std/std_cctype.h, std_cerrno.h, std_cfloat.h, + std_climits.h, std_clocale.h, std_cmath.h, std_csetjmp.h, + std_csignal.h, std_cstdarg.h, std_cstddef.h, std_cstdio.h, + std_cstdlib.h, std_cstring.h, std_ctime.h, std_cwchar.h, + std_cwctype.h: Same. + * include/c_std/cmath: Adjust cmath.tcc include. + * include/c_std/cstdlib: Adjust includes. + * include/c_std/cwchar: Same. + * include/c_std/ctime: Same. + * include/c_std/cstring: Same. + * include/c_std/cstdio: Same. + * include/c_std/bits: Remove directory. + + * include/c/bits/std_cassert.h: Move to... + * include/c/cassert: Here. + * include/c/std_cctype.h, std_cerrno.h, std_cfloat.h, + std_climits.h, std_clocale.h, std_cmath.h, std_csetjmp.h, + std_csignal.h, std_cstdarg.h, std_cstddef.h, std_cstdio.h, + std_cstdlib.h, std_cstring.h, std_ctime.h, std_cwchar.h, + std_cwctype.h: Same. + * include/c/bits: Remove directory. + + * include/std/cwctype: Remove. + * include/std/cwchar: Remove. + * include/std/ctime: Remove. + * include/std/cstring: Remove. + * include/std/cstdlib: Remove. + * include/std/cstdio: Remove. + * include/std/cstddef: Remove. + * include/std/cstdarg: Remove. + * include/std/csignal: Remove. + * include/std/csetjmp: Remove. + * include/std/cmath: Remove. + * include/std/clocale: Remove. + * include/std/climits: Remove. + * include/std/ciso646: Remove. + * include/std/cfloat: Remove. + * include/std/cerrno: Remove. + * include/std/cctype: Remove. + * include/std/cassert: Remove. + + * include/bits/fpos.h: Adjust includes, removing + files and subsituting <.xxx> + * include/bits/valarray_array.h: Same. + * include/bits/stl_uninitialized.h: Same. + * include/bits/stl_alloc.h: Same. + * include/bits/stl_algobase.h: Same. + * include/bits/sstream.tcc: Same. + * include/bits/pthread_allocimpl.h: Same. + * include/bits/ostream.tcc: Same. + * include/bits/localefwd.h: Same. + * include/bits/locale_facets.tcc: Same. + * include/bits/locale_facets.h: Same. + * include/bits/istream.tcc: Same. + * include/bits/char_traits.h: Same. + * include/bits/boost_concept_check.h: Same. + * include/bits/basic_file.h: Same. + * include/std/bitset: Same. + * include/std/complex: Same. + * include/std/fstream: Same. + * include/std/functional: Same. + * include/std/ios: Same. + * include/std/iostream: Same. + * include/std/ostream: Same. + * include/std/sstream: Same. + * include/std/streambuf: Same. + * include/std/string: Same. + * include/std/iterator: Same. + * include/std/valarray: Same. + + * src/ios.cc: Adjust includes. + * src/valarray-inst.cc: Same. + * src/string-inst.cc: Same. + * src/stl-inst.cc: Same. + * src/stdexcept.cc: Same. + * src/misc-inst.cc: Same. + * src/localename.cc: Same. + * src/locale-inst.cc: Same. + * src/locale.cc: Same. + * src/limits.cc: Same. + * src/concept-inst.cc: Same. + * src/complex_io.cc: Same. + * src/codecvt.cc: Same. + * src/bitset.cc: Same. + * src/cmath.cc: Same. + 2002-01-04 Paolo Carlini * include/bits/stl_tree.h (rb_tree): Move to... @@ -30,7 +161,7 @@ * include/backward/function.h: Include , tweak. * include/ext/ropeimpl.h: Include . -Thu Jan 3 11:05:41 2002 Jeffrey A Law (law@redhat.com) +2002-01-03 Jeffrey A Law * config/os/hpux/bits/os_defines.h: Prefix __strtoll and __strtoull declarations with __extension__. diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 21e07d4..d07776b 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -18520,7 +18520,7 @@ else fi rm -f conftest* - for ac_hdr in unistd.h + for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -18652,11 +18652,24 @@ else #include #include +#if HAVE_SYS_TYPES_H +# include +#endif + +#if HAVE_STDLIB_H +# include +#endif + +#if HAVE_SYS_STAT_H +# include +#endif + +#if HAVE_UNISTD_H +# include +#endif + /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H @@ -18764,7 +18777,7 @@ main() } EOF -if { (eval echo configure:18768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:18781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -18795,17 +18808,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:18799: checking for $ac_hdr" >&5 +echo "configure:18812: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:18809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:18822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -18838,7 +18851,7 @@ done # Can't do these in a loop, else the resulting syntax is wrong. cat > conftest.$ac_ext < #include @@ -18847,7 +18860,7 @@ int main() { int f = RLIMIT_DATA ; ; return 0; } EOF -if { (eval echo configure:18851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* glibcpp_mresult=1 else @@ -18864,7 +18877,7 @@ EOF cat > conftest.$ac_ext < #include @@ -18873,7 +18886,7 @@ int main() { int f = RLIMIT_RSS ; ; return 0; } EOF -if { (eval echo configure:18877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* glibcpp_mresult=1 else @@ -18890,7 +18903,7 @@ EOF cat > conftest.$ac_ext < #include @@ -18899,7 +18912,7 @@ int main() { int f = RLIMIT_VMEM ; ; return 0; } EOF -if { (eval echo configure:18903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* glibcpp_mresult=1 else @@ -18916,7 +18929,7 @@ EOF cat > conftest.$ac_ext < #include @@ -18925,7 +18938,7 @@ int main() { int f = RLIMIT_AS ; ; return 0; } EOF -if { (eval echo configure:18929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* glibcpp_mresult=1 else @@ -18947,7 +18960,7 @@ EOF else cat > conftest.$ac_ext < #include @@ -18956,7 +18969,7 @@ int main() { struct rlimit r; setrlimit(0, &r); ; return 0; } EOF -if { (eval echo configure:18960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_setrlimit=yes else @@ -18972,7 +18985,7 @@ fi fi echo $ac_n "checking for testsuite memory limit support""... $ac_c" 1>&6 -echo "configure:18976: checking for testsuite memory limit support" >&5 +echo "configure:18989: checking for testsuite memory limit support" >&5 if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then ac_mem_limits=yes cat >> confdefs.h <<\EOF @@ -19074,13 +19087,13 @@ glibcpp_toolexeclibdir=no glibcpp_prefixdir=${prefix} echo $ac_n "checking for interface version number""... $ac_c" 1>&6 -echo "configure:19078: checking for interface version number" >&5 +echo "configure:19091: checking for interface version number" >&5 libstdcxx_interface=$INTERFACE echo "$ac_t""$libstdcxx_interface" 1>&6 # Process the option --with-gxx-include-dir= echo $ac_n "checking for --with-gxx-include-dir""... $ac_c" 1>&6 -echo "configure:19084: checking for --with-gxx-include-dir" >&5 +echo "configure:19097: checking for --with-gxx-include-dir" >&5 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. if test "${with_gxx_include_dir+set}" = set; then withval="$with_gxx_include_dir" @@ -19104,7 +19117,7 @@ echo "$ac_t""$gxx_include_dir" 1>&6 # Process the option "--enable-version-specific-runtime-libs" echo $ac_n "checking for --enable-version-specific-runtime-libs""... $ac_c" 1>&6 -echo "configure:19108: checking for --enable-version-specific-runtime-libs" >&5 +echo "configure:19121: checking for --enable-version-specific-runtime-libs" >&5 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. if test "${enable_version_specific_runtime_libs+set}" = set; then enableval="$enable_version_specific_runtime_libs" @@ -19151,7 +19164,7 @@ if test x"$glibcpp_toolexecdir" = x"no"; then fi echo $ac_n "checking for install location""... $ac_c" 1>&6 -echo "configure:19155: checking for install location" >&5 +echo "configure:19168: checking for install location" >&5 echo "$ac_t""$gxx_include_dir" 1>&6 diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am index 17c4baa..eff88d0 100644 --- a/libstdc++-v3/include/Makefile.am +++ b/libstdc++-v3/include/Makefile.am @@ -64,35 +64,6 @@ bits_headers = \ ${bits_srcdir}/slice.h \ ${bits_srcdir}/slice_array.h \ ${bits_srcdir}/sstream.tcc \ - ${bits_srcdir}/std_algorithm.h \ - ${bits_srcdir}/std_bitset.h \ - ${bits_srcdir}/std_complex.h \ - ${bits_srcdir}/std_deque.h \ - ${bits_srcdir}/std_fstream.h \ - ${bits_srcdir}/std_functional.h \ - ${bits_srcdir}/std_iomanip.h \ - ${bits_srcdir}/std_ios.h \ - ${bits_srcdir}/std_iosfwd.h \ - ${bits_srcdir}/std_iostream.h \ - ${bits_srcdir}/std_istream.h \ - ${bits_srcdir}/std_iterator.h \ - ${bits_srcdir}/std_limits.h \ - ${bits_srcdir}/std_list.h \ - ${bits_srcdir}/std_locale.h \ - ${bits_srcdir}/std_map.h \ - ${bits_srcdir}/std_memory.h \ - ${bits_srcdir}/std_numeric.h \ - ${bits_srcdir}/std_ostream.h \ - ${bits_srcdir}/std_queue.h \ - ${bits_srcdir}/std_set.h \ - ${bits_srcdir}/std_sstream.h \ - ${bits_srcdir}/std_stack.h \ - ${bits_srcdir}/std_stdexcept.h \ - ${bits_srcdir}/std_streambuf.h \ - ${bits_srcdir}/std_string.h \ - ${bits_srcdir}/std_utility.h \ - ${bits_srcdir}/std_valarray.h \ - ${bits_srcdir}/std_vector.h \ ${bits_srcdir}/stl_algo.h \ ${bits_srcdir}/stl_algobase.h \ ${bits_srcdir}/stl_alloc.h \ @@ -188,26 +159,27 @@ ext_headers = \ ${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@/bits -c_base_builddir = ./bits +c_base_srcdir = @C_INCLUDE_DIR@/ +c_base_builddir = ./ c_base_headers = \ - ${c_base_srcdir}/std_cassert.h \ - ${c_base_srcdir}/std_cctype.h \ - ${c_base_srcdir}/std_cerrno.h \ - ${c_base_srcdir}/std_cfloat.h \ - ${c_base_srcdir}/std_climits.h \ - ${c_base_srcdir}/std_clocale.h \ - ${c_base_srcdir}/std_cmath.h \ - ${c_base_srcdir}/std_csetjmp.h \ - ${c_base_srcdir}/std_csignal.h \ - ${c_base_srcdir}/std_cstdarg.h \ - ${c_base_srcdir}/std_cstddef.h \ - ${c_base_srcdir}/std_cstdio.h \ - ${c_base_srcdir}/std_cstdlib.h \ - ${c_base_srcdir}/std_cstring.h \ - ${c_base_srcdir}/std_ctime.h \ - ${c_base_srcdir}/std_cwchar.h \ - ${c_base_srcdir}/std_cwctype.h \ + ${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 @@ -241,25 +213,7 @@ std_headers = \ ${std_srcdir}/string \ ${std_srcdir}/utility \ ${std_srcdir}/valarray \ - ${std_srcdir}/vector \ - ${std_srcdir}/cassert \ - ${std_srcdir}/cctype \ - ${std_srcdir}/cerrno \ - ${std_srcdir}/cfloat \ - ${std_srcdir}/climits \ - ${std_srcdir}/clocale \ - ${std_srcdir}/ciso646 \ - ${std_srcdir}/cmath \ - ${std_srcdir}/csetjmp \ - ${std_srcdir}/csignal \ - ${std_srcdir}/cstdarg \ - ${std_srcdir}/cstddef \ - ${std_srcdir}/cstdio \ - ${std_srcdir}/cstdlib \ - ${std_srcdir}/cstring \ - ${std_srcdir}/ctime \ - ${std_srcdir}/cwchar \ - ${std_srcdir}/cwctype + ${std_srcdir}/vector target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@ target_builddir = ./${target_alias}/bits diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index f07088c..ab7981c 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -1,7 +1,6 @@ -# Makefile.in generated automatically by automake 1.5 from Makefile.am. +# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995-8, 1999, 2001 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. @@ -11,7 +10,6 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -@SET_MAKE@ SHELL = @SHELL@ @@ -33,9 +31,13 @@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include + +DESTDIR = + pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ + top_builddir = .. ACLOCAL = @ACLOCAL@ @@ -44,11 +46,11 @@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ + NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : @@ -82,6 +84,7 @@ C_INCLUDE_DIR = @C_INCLUDE_DIR@ DATADIRNAME = @DATADIRNAME@ DEBUG_FLAGS = @DEBUG_FLAGS@ DLLTOOL = @DLLTOOL@ +EXEEXT = @EXEEXT@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ GCJ = @GCJ@ GCJFLAGS = @GCJFLAGS@ @@ -105,6 +108,7 @@ LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ OBJDUMP = @OBJDUMP@ @@ -142,23 +146,16 @@ libtool_VERSION = @libtool_VERSION@ release_VERSION = @release_VERSION@ toplevel_srcdir = @toplevel_srcdir@ -# Cross compiler and multilib support. -CXX = @glibcpp_CXX@ -glibcpp_builddir = @glibcpp_builddir@ -glibcpp_srcdir = @glibcpp_srcdir@ - -# Target includes for threads -glibcpp_thread_h = @glibcpp_thread_h@ - -# One big happy istallation: just copy everything from the build to the -# install tree (except for the build stamps). -gxx_include_dir = @gxx_include_dir@ - AUTOMAKE_OPTIONS = 1.3 gnits MAINT_CHARSET = latin1 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs +# Cross compiler and multilib support. +CXX = @glibcpp_CXX@ +glibcpp_srcdir = @glibcpp_srcdir@ +glibcpp_builddir = @glibcpp_builddir@ + bits_srcdir = ${glibcpp_srcdir}/include/bits bits_builddir = ./bits bits_headers = \ @@ -192,35 +189,6 @@ bits_headers = \ ${bits_srcdir}/slice.h \ ${bits_srcdir}/slice_array.h \ ${bits_srcdir}/sstream.tcc \ - ${bits_srcdir}/std_algorithm.h \ - ${bits_srcdir}/std_bitset.h \ - ${bits_srcdir}/std_complex.h \ - ${bits_srcdir}/std_deque.h \ - ${bits_srcdir}/std_fstream.h \ - ${bits_srcdir}/std_functional.h \ - ${bits_srcdir}/std_iomanip.h \ - ${bits_srcdir}/std_ios.h \ - ${bits_srcdir}/std_iosfwd.h \ - ${bits_srcdir}/std_iostream.h \ - ${bits_srcdir}/std_istream.h \ - ${bits_srcdir}/std_iterator.h \ - ${bits_srcdir}/std_limits.h \ - ${bits_srcdir}/std_list.h \ - ${bits_srcdir}/std_locale.h \ - ${bits_srcdir}/std_map.h \ - ${bits_srcdir}/std_memory.h \ - ${bits_srcdir}/std_numeric.h \ - ${bits_srcdir}/std_ostream.h \ - ${bits_srcdir}/std_queue.h \ - ${bits_srcdir}/std_set.h \ - ${bits_srcdir}/std_sstream.h \ - ${bits_srcdir}/std_stack.h \ - ${bits_srcdir}/std_stdexcept.h \ - ${bits_srcdir}/std_streambuf.h \ - ${bits_srcdir}/std_string.h \ - ${bits_srcdir}/std_utility.h \ - ${bits_srcdir}/std_valarray.h \ - ${bits_srcdir}/std_vector.h \ ${bits_srcdir}/stl_algo.h \ ${bits_srcdir}/stl_algobase.h \ ${bits_srcdir}/stl_alloc.h \ @@ -319,26 +287,27 @@ ext_headers = \ # This is the common subset of files that all three "C" header models use. -c_base_srcdir = @C_INCLUDE_DIR@/bits -c_base_builddir = ./bits +c_base_srcdir = @C_INCLUDE_DIR@/ +c_base_builddir = ./ c_base_headers = \ - ${c_base_srcdir}/std_cassert.h \ - ${c_base_srcdir}/std_cctype.h \ - ${c_base_srcdir}/std_cerrno.h \ - ${c_base_srcdir}/std_cfloat.h \ - ${c_base_srcdir}/std_climits.h \ - ${c_base_srcdir}/std_clocale.h \ - ${c_base_srcdir}/std_cmath.h \ - ${c_base_srcdir}/std_csetjmp.h \ - ${c_base_srcdir}/std_csignal.h \ - ${c_base_srcdir}/std_cstdarg.h \ - ${c_base_srcdir}/std_cstddef.h \ - ${c_base_srcdir}/std_cstdio.h \ - ${c_base_srcdir}/std_cstdlib.h \ - ${c_base_srcdir}/std_cstring.h \ - ${c_base_srcdir}/std_ctime.h \ - ${c_base_srcdir}/std_cwchar.h \ - ${c_base_srcdir}/std_cwctype.h \ + ${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 @@ -373,25 +342,7 @@ std_headers = \ ${std_srcdir}/string \ ${std_srcdir}/utility \ ${std_srcdir}/valarray \ - ${std_srcdir}/vector \ - ${std_srcdir}/cassert \ - ${std_srcdir}/cctype \ - ${std_srcdir}/cerrno \ - ${std_srcdir}/cfloat \ - ${std_srcdir}/climits \ - ${std_srcdir}/clocale \ - ${std_srcdir}/ciso646 \ - ${std_srcdir}/cmath \ - ${std_srcdir}/csetjmp \ - ${std_srcdir}/csignal \ - ${std_srcdir}/cstdarg \ - ${std_srcdir}/cstddef \ - ${std_srcdir}/cstdio \ - ${std_srcdir}/cstdlib \ - ${std_srcdir}/cstring \ - ${std_srcdir}/ctime \ - ${std_srcdir}/cwchar \ - ${std_srcdir}/cwctype + ${std_srcdir}/vector target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@ @@ -417,108 +368,114 @@ thread_headers = \ allstamps = stamp-std stamp-bits stamp-c_base stamp-backward stamp-ext \ stamp-target stamp-thread + +# Target includes for threads +glibcpp_thread_h = @glibcpp_thread_h@ uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_] -subdir = include -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -depcomp = -DIST_SOURCES = -all: all-am -.SUFFIXES: +# One big happy istallation: just copy everything from the build to the +# install tree (except for the build stamps). +gxx_include_dir = @gxx_include_dir@ +CONFIG_HEADER = ../config.h +CONFIG_CLEAN_FILES = +DIST_COMMON = Makefile.am Makefile.in -mostlyclean-libtool: - -rm -f *.lo -clean-libtool: - -rm -rf .libs _libs +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +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 + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status -distclean-libtool: - -rm -f libtool -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && \ - $(AUTOMAKE) --cygnus include/Makefile -Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && \ - CONFIG_HEADERS= CONFIG_LINKS= \ - CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status -uninstall-info-am: tags: TAGS TAGS: -check-am: -check: check-am -all-am: Makefile all-local -installdirs: +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) -install: install-am +subdir = include + +distdir: $(DISTFILES) + @for file in $(DISTFILES); do \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-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 + +install-data-am: install-data-local install-data: install-data-am -uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am +install: install-am +uninstall-am: +uninstall: uninstall-am +all-am: Makefile all-local +all-redirect: all-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + + mostlyclean-generic: clean-generic: distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -distclean-am: clean-am distclean-generic distclean-libtool +mostlyclean-am: mostlyclean-generic -dvi: dvi-am - -dvi-am: - -info: info-am - -info-am: +mostlyclean: mostlyclean-am -install-data-am: install-data-local +clean-am: clean-generic mostlyclean-am -install-exec-am: +clean: clean-am -install-info: +distclean-am: distclean-generic clean-am + -rm -f libtool -install-man: +distclean: distclean-am -installcheck-am: +maintainer-clean-am: maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -uninstall-am: - -.PHONY: all all-am all-local check check-am clean clean-generic \ - clean-libtool distclean distclean-generic distclean-libtool dvi \ - dvi-am info info-am install install-am install-data \ - install-data-am install-data-local install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool uninstall uninstall-am uninstall-info-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 # Here are the rules for building the headers @@ -625,6 +582,7 @@ install-data-local: # By adding these files here, automake will remove them for 'make clean' #CLEANFILES = ${allstamps} + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/libstdc++-v3/include/backward/bvector.h b/libstdc++-v3/include/backward/bvector.h index 4a04ca6..b114052 100644 --- a/libstdc++-v3/include/backward/bvector.h +++ b/libstdc++-v3/include/backward/bvector.h @@ -58,7 +58,7 @@ #include "backward_warning.h" -#include +#include using std::bit_vector; @@ -67,5 +67,3 @@ using std::bit_vector; // Local Variables: // mode:C++ // End: - - diff --git a/libstdc++-v3/include/backward/complex.h b/libstdc++-v3/include/backward/complex.h index c7e1d1c..0e72174 100644 --- a/libstdc++-v3/include/backward/complex.h +++ b/libstdc++-v3/include/backward/complex.h @@ -29,7 +29,7 @@ #define _CPP_BACKWARD_COMPLEX_H 1 #include "backward_warning.h" -#include +#include using std::complex; typedef complex float_complex; diff --git a/libstdc++-v3/include/backward/deque.h b/libstdc++-v3/include/backward/deque.h index de4bf6a..983ae07 100644 --- a/libstdc++-v3/include/backward/deque.h +++ b/libstdc++-v3/include/backward/deque.h @@ -59,7 +59,7 @@ #include "backward_warning.h" #include "algobase.h" #include "alloc.h" -#include +#include using std::deque; diff --git a/libstdc++-v3/include/backward/fstream.h b/libstdc++-v3/include/backward/fstream.h index 4f03e4c..44461f4 100644 --- a/libstdc++-v3/include/backward/fstream.h +++ b/libstdc++-v3/include/backward/fstream.h @@ -29,7 +29,7 @@ #define _CPP_BACKWARD_FSTREAM_H 1 #include "backward_warning.h" -#include +#include using std::filebuf; using std::ifstream; diff --git a/libstdc++-v3/include/backward/iomanip.h b/libstdc++-v3/include/backward/iomanip.h index dad183e..53286cd 100644 --- a/libstdc++-v3/include/backward/iomanip.h +++ b/libstdc++-v3/include/backward/iomanip.h @@ -30,7 +30,7 @@ #include "backward_warning.h" #include "iostream.h" -#include +#include // These are from as per [27.4]. using std::boolalpha; diff --git a/libstdc++-v3/include/backward/iostream.h b/libstdc++-v3/include/backward/iostream.h index 0d258af..5346d9d 100644 --- a/libstdc++-v3/include/backward/iostream.h +++ b/libstdc++-v3/include/backward/iostream.h @@ -29,7 +29,7 @@ #define _CPP_BACKWARD_IOSTREAM_H 1 #include "backward_warning.h" -#include +#include using std::iostream; using std::ostream; diff --git a/libstdc++-v3/include/backward/iterator.h b/libstdc++-v3/include/backward/iterator.h index 8624fc2..179f457 100644 --- a/libstdc++-v3/include/backward/iterator.h +++ b/libstdc++-v3/include/backward/iterator.h @@ -31,7 +31,7 @@ #include "function.h" #include #include "iostream.h" -#include +#include #include #include diff --git a/libstdc++-v3/include/backward/list.h b/libstdc++-v3/include/backward/list.h index e9db48c..350a92a 100644 --- a/libstdc++-v3/include/backward/list.h +++ b/libstdc++-v3/include/backward/list.h @@ -59,7 +59,7 @@ #include "backward_warning.h" #include "algobase.h" #include "alloc.h" -#include +#include using std::list; diff --git a/libstdc++-v3/include/backward/map.h b/libstdc++-v3/include/backward/map.h index fb7911a..00f606d 100644 --- a/libstdc++-v3/include/backward/map.h +++ b/libstdc++-v3/include/backward/map.h @@ -58,7 +58,7 @@ #include "backward_warning.h" #include "tree.h" -#include +#include using std::map; diff --git a/libstdc++-v3/include/backward/multimap.h b/libstdc++-v3/include/backward/multimap.h index 2b36dd3..b9cdc84 100644 --- a/libstdc++-v3/include/backward/multimap.h +++ b/libstdc++-v3/include/backward/multimap.h @@ -58,7 +58,7 @@ #include "backward_warning.h" #include "tree.h" -#include +#include using std::multimap; diff --git a/libstdc++-v3/include/backward/multiset.h b/libstdc++-v3/include/backward/multiset.h index fb2c02c..8aa7fd3 100644 --- a/libstdc++-v3/include/backward/multiset.h +++ b/libstdc++-v3/include/backward/multiset.h @@ -58,7 +58,7 @@ #include "backward_warning.h" #include "tree.h" -#include +#include using std::multiset; diff --git a/libstdc++-v3/include/backward/queue.h b/libstdc++-v3/include/backward/queue.h index 6eaf246..1d3b29c 100644 --- a/libstdc++-v3/include/backward/queue.h +++ b/libstdc++-v3/include/backward/queue.h @@ -29,7 +29,7 @@ #define _CPP_BACKWARD_QUEUE_H 1 #include "backward_warning.h" -#include +#include using std::queue; using std::priority_queue; diff --git a/libstdc++-v3/include/backward/set.h b/libstdc++-v3/include/backward/set.h index ae4011a..c189255 100644 --- a/libstdc++-v3/include/backward/set.h +++ b/libstdc++-v3/include/backward/set.h @@ -58,7 +58,7 @@ #include "backward_warning.h" #include "tree.h" -#include +#include using std::set; diff --git a/libstdc++-v3/include/backward/stack.h b/libstdc++-v3/include/backward/stack.h index 19e8cd1..6f60293 100644 --- a/libstdc++-v3/include/backward/stack.h +++ b/libstdc++-v3/include/backward/stack.h @@ -61,7 +61,7 @@ #include "deque.h" #include "heap.h" #include "queue.h" -#include +#include using std::stack; diff --git a/libstdc++-v3/include/backward/streambuf.h b/libstdc++-v3/include/backward/streambuf.h index 3965816d..aef863f 100644 --- a/libstdc++-v3/include/backward/streambuf.h +++ b/libstdc++-v3/include/backward/streambuf.h @@ -29,7 +29,7 @@ #define _CPP_BACKWARD_STREAMBUF_H 1 #include "backward_warning.h" -#include +#include using std::streambuf; diff --git a/libstdc++-v3/include/backward/strstream b/libstdc++-v3/include/backward/strstream index f60010c..28308e3 100644 --- a/libstdc++-v3/include/backward/strstream +++ b/libstdc++-v3/include/backward/strstream @@ -49,11 +49,11 @@ #define __SGI_STL_STRSTREAM #include "backward_warning.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include namespace std { diff --git a/libstdc++-v3/include/backward/vector.h b/libstdc++-v3/include/backward/vector.h index 1746cb2..7788068 100644 --- a/libstdc++-v3/include/backward/vector.h +++ b/libstdc++-v3/include/backward/vector.h @@ -59,7 +59,7 @@ #include "backward_warning.h" #include "algobase.h" #include "alloc.h" -#include +#include using std::vector; diff --git a/libstdc++-v3/include/bits/basic_file.h b/libstdc++-v3/include/bits/basic_file.h index 9c0c1d3..51dde5b 100644 --- a/libstdc++-v3/include/bits/basic_file.h +++ b/libstdc++-v3/include/bits/basic_file.h @@ -42,7 +42,7 @@ #pragma GCC system_header #include -#include +#include namespace std { diff --git a/libstdc++-v3/include/bits/boost_concept_check.h b/libstdc++-v3/include/bits/boost_concept_check.h index bea39cf..29ca61b 100644 --- a/libstdc++-v3/include/bits/boost_concept_check.h +++ b/libstdc++-v3/include/bits/boost_concept_check.h @@ -17,7 +17,7 @@ #define _GLIBCPP_BOOST_CONCEPT_CHECK 1 #pragma GCC system_header -#include // for ptrdiff_t, used next +#include // for ptrdiff_t, used next #include // for traits and tags #include // for pair<> diff --git a/libstdc++-v3/include/bits/char_traits.h b/libstdc++-v3/include/bits/char_traits.h index 710e0eb..7d14838 100644 --- a/libstdc++-v3/include/bits/char_traits.h +++ b/libstdc++-v3/include/bits/char_traits.h @@ -41,7 +41,7 @@ #pragma GCC system_header -#include // For memmove, memset, memchr +#include // For memmove, memset, memchr #include // For streampos namespace std diff --git a/libstdc++-v3/include/bits/fpos.h b/libstdc++-v3/include/bits/fpos.h index 119fbe7..3cb3e4b 100644 --- a/libstdc++-v3/include/bits/fpos.h +++ b/libstdc++-v3/include/bits/fpos.h @@ -42,7 +42,7 @@ #pragma GCC system_header #include -#include // For mbstate_t. +#include // For mbstate_t. namespace std { @@ -121,6 +121,3 @@ namespace std } // namespace std #endif - - - diff --git a/libstdc++-v3/include/bits/istream.tcc b/libstdc++-v3/include/bits/istream.tcc index 43ea6a5..4bc8da1 100644 --- a/libstdc++-v3/include/bits/istream.tcc +++ b/libstdc++-v3/include/bits/istream.tcc @@ -29,8 +29,8 @@ // ISO C++ 14882: 27.6.2 Output streams // -#include -#include // for flush() +#include +#include // For flush() namespace std { diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h index 8550709..824b03a 100644 --- a/libstdc++-v3/include/bits/locale_facets.h +++ b/libstdc++-v3/include/bits/locale_facets.h @@ -41,11 +41,11 @@ #pragma GCC system_header -#include // For struct tm -#include // For ios_base +#include // For struct tm #ifdef _GLIBCPP_USE_WCHAR_T -# include // For wctype_t +# include // For wctype_t #endif +#include // For ios_base namespace std { diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc index 58d72c7..2731640 100644 --- a/libstdc++-v3/include/bits/locale_facets.tcc +++ b/libstdc++-v3/include/bits/locale_facets.tcc @@ -32,16 +32,16 @@ #ifndef _CPP_BITS_LOCFACETS_TCC #define _CPP_BITS_LOCFACETS_TCC 1 -#include -#include // For localeconv -#include // For strof, strtold -#include // For ceil -#include // For numeric_limits -#include // For auto_ptr +#include +#include // For localeconv +#include // For strof, strtold +#include // For ceil +#include // For isspace +#include // For numeric_limits +#include // For auto_ptr #include // For streambuf_iterators -#include // For isspace #include // For bad_cast -#include +#include namespace std { diff --git a/libstdc++-v3/include/bits/localefwd.h b/libstdc++-v3/include/bits/localefwd.h index a0fe324..558ccab 100644 --- a/libstdc++-v3/include/bits/localefwd.h +++ b/libstdc++-v3/include/bits/localefwd.h @@ -43,9 +43,9 @@ #include #include // Defines __c_locale, config-specific includes -#include // For CHAR_BIT -#include // For string -#include // For isspace, etc. +#include // For CHAR_BIT +#include // For isspace, etc. +#include // For string #include namespace std diff --git a/libstdc++-v3/include/bits/ostream.tcc b/libstdc++-v3/include/bits/ostream.tcc index ff3c958..698029c 100644 --- a/libstdc++-v3/include/bits/ostream.tcc +++ b/libstdc++-v3/include/bits/ostream.tcc @@ -29,7 +29,7 @@ // ISO C++ 14882: 27.6.2 Output streams // -#include +#include namespace std { diff --git a/libstdc++-v3/include/bits/pthread_allocimpl.h b/libstdc++-v3/include/bits/pthread_allocimpl.h index ca0f980..050b206 100644 --- a/libstdc++-v3/include/bits/pthread_allocimpl.h +++ b/libstdc++-v3/include/bits/pthread_allocimpl.h @@ -62,7 +62,7 @@ // consequences. #include -#include +#include #include #ifndef __RESTRICT # define __RESTRICT diff --git a/libstdc++-v3/include/bits/sstream.tcc b/libstdc++-v3/include/bits/sstream.tcc index 2a03ff0..4198ea8 100644 --- a/libstdc++-v3/include/bits/sstream.tcc +++ b/libstdc++-v3/include/bits/sstream.tcc @@ -34,7 +34,7 @@ #ifndef _CPP_BITS_SSTREAM_TCC #define _CPP_BITS_SSTREAM_TCC 1 -#include +#include namespace std { diff --git a/libstdc++-v3/include/bits/std_algorithm.h b/libstdc++-v3/include/bits/std_algorithm.h deleted file mode 100644 index 746eb47..0000000 --- a/libstdc++-v3/include/bits/std_algorithm.h +++ /dev/null @@ -1,76 +0,0 @@ -// -*- 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 -#include -#include -#include -#include - -#endif /* _CPP_ALGORITHM */ - -// Local Variables: -// mode:C++ -// End: diff --git a/libstdc++-v3/include/bits/std_bitset.h b/libstdc++-v3/include/bits/std_bitset.h deleted file mode 100644 index 67647ce..0000000 --- a/libstdc++-v3/include/bits/std_bitset.h +++ /dev/null @@ -1,814 +0,0 @@ -// -*- 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 // for size_t -#include // for memset -#include -#include -#include // for invalid_argument, out_of_range, - // overflow_error -#include // for ostream (operator<<) -#include // 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 -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 -struct _First_one { - static unsigned char _S_first_one[256]; -}; - -// -// Base class: general case. -// - -template -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::_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 -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 -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 -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 _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(__thisword & (~(unsigned char)0)); - if ( __this_byte ) - return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT + - _First_one::_S_first_one[__this_byte]; - - __thisword >>= CHAR_BIT; - } - } - } - // not found, so return an indication of failure. - return __not_found; -} - -template -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(__thisword & (~(unsigned char)0)); - if ( __this_byte ) - return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT + - _First_one::_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(__thisword & (~(unsigned char)0)); - if ( __this_byte ) - return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT + - _First_one::_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::_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 struct _Sanitize { - static void _M_do_sanitize(unsigned long& __val) - { __val &= ~((~static_cast(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 -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 - 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 - 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 - 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 - void _M_copy_from_string(const basic_string<_CharT,_Traits,_Alloc>& __s, - size_t, - size_t); - - template - 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 -template -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 -template -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 -inline bitset<_Nb> operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) { - bitset<_Nb> __result(__x); - __result &= __y; - return __result; -} - - -template -inline bitset<_Nb> operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y) { - bitset<_Nb> __result(__x); - __result |= __y; - return __result; -} - -template -inline bitset<_Nb> operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) { - bitset<_Nb> __result(__x); - __result ^= __y; - return __result; -} - -template -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(0), _Nb); - } - - return __is; -} - -template -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/bits/std_complex.h b/libstdc++-v3/include/bits/std_complex.h deleted file mode 100644 index d07a6b7..0000000 --- a/libstdc++-v3/include/bits/std_complex.h +++ /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 -// Improved by Gabriel Dos Reis -// - -/** @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 -#include -#include -#include - -namespace std -{ - // Forward declarations - template class complex; - template<> class complex; - template<> class complex; - template<> class complex; - - template _Tp abs(const complex<_Tp>&); - template _Tp arg(const complex<_Tp>&); - template _Tp norm(const complex<_Tp>&); - - template complex<_Tp> conj(const complex<_Tp>&); - template complex<_Tp> polar(const _Tp&, const _Tp& = 0); - - // Transcendentals: - template complex<_Tp> cos(const complex<_Tp>&); - template complex<_Tp> cosh(const complex<_Tp>&); - template complex<_Tp> exp(const complex<_Tp>&); - template complex<_Tp> log(const complex<_Tp>&); - template complex<_Tp> log10(const complex<_Tp>&); - template complex<_Tp> pow(const complex<_Tp>&, int); - template complex<_Tp> pow(const complex<_Tp>&, const _Tp&); - template complex<_Tp> pow(const complex<_Tp>&, - const complex<_Tp>&); - template complex<_Tp> pow(const _Tp&, const complex<_Tp>&); - template complex<_Tp> sin(const complex<_Tp>&); - template complex<_Tp> sinh(const complex<_Tp>&); - template complex<_Tp> sqrt(const complex<_Tp>&); - template complex<_Tp> tan(const complex<_Tp>&); - template complex<_Tp> tanh(const complex<_Tp>&); - - - // 26.2.2 Primary template class complex - template - 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 - 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 - complex<_Tp>& operator=(const complex<_Up>&); - template - complex<_Tp>& operator+=(const complex<_Up>&); - template - complex<_Tp>& operator-=(const complex<_Up>&); - template - complex<_Tp>& operator*=(const complex<_Up>&); - template - complex<_Tp>& operator/=(const complex<_Up>&); - - private: - _Tp _M_real, _M_imag; - }; - - template - inline _Tp - complex<_Tp>::real() const { return _M_real; } - - template - inline _Tp - complex<_Tp>::imag() const { return _M_imag; } - - template - inline - complex<_Tp>::complex(const _Tp& __r, const _Tp& __i) - : _M_real(__r), _M_imag(__i) { } - - template - template - inline - complex<_Tp>::complex(const complex<_Up>& __z) - : _M_real(__z.real()), _M_imag(__z.imag()) { } - - template - complex<_Tp>& - complex<_Tp>::operator=(const _Tp& __t) - { - _M_real = __t; - _M_imag = _Tp(); - return *this; - } - - // 26.2.5/1 - template - inline complex<_Tp>& - complex<_Tp>::operator+=(const _Tp& __t) - { - _M_real += __t; - return *this; - } - - // 26.2.5/3 - template - inline complex<_Tp>& - complex<_Tp>::operator-=(const _Tp& __t) - { - _M_real -= __t; - return *this; - } - - // 26.2.5/5 - template - complex<_Tp>& - complex<_Tp>::operator*=(const _Tp& __t) - { - _M_real *= __t; - _M_imag *= __t; - return *this; - } - - // 26.2.5/7 - template - complex<_Tp>& - complex<_Tp>::operator/=(const _Tp& __t) - { - _M_real /= __t; - _M_imag /= __t; - return *this; - } - - template - template - complex<_Tp>& - complex<_Tp>::operator=(const complex<_Up>& __z) - { - _M_real = __z.real(); - _M_imag = __z.imag(); - return *this; - } - - // 26.2.5/9 - template - template - complex<_Tp>& - complex<_Tp>::operator+=(const complex<_Up>& __z) - { - _M_real += __z.real(); - _M_imag += __z.imag(); - return *this; - } - - // 26.2.5/11 - template - template - 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 - template - 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 - template - 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 - inline complex<_Tp> - operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) - { return complex<_Tp> (__x) += __y; } - - template - inline complex<_Tp> - operator+(const complex<_Tp>& __x, const _Tp& __y) - { return complex<_Tp> (__x) += __y; } - - template - inline complex<_Tp> - operator+(const _Tp& __x, const complex<_Tp>& __y) - { return complex<_Tp> (__y) += __x; } - - template - inline complex<_Tp> - operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) - { return complex<_Tp> (__x) -= __y; } - - template - inline complex<_Tp> - operator-(const complex<_Tp>& __x, const _Tp& __y) - { return complex<_Tp> (__x) -= __y; } - - template - inline complex<_Tp> - operator-(const _Tp& __x, const complex<_Tp>& __y) - { return complex<_Tp> (__x) -= __y; } - - template - inline complex<_Tp> - operator*(const complex<_Tp>& __x, const complex<_Tp>& __y) - { return complex<_Tp> (__x) *= __y; } - - template - inline complex<_Tp> - operator*(const complex<_Tp>& __x, const _Tp& __y) - { return complex<_Tp> (__x) *= __y; } - - template - inline complex<_Tp> - operator*(const _Tp& __x, const complex<_Tp>& __y) - { return complex<_Tp> (__y) *= __x; } - - template - inline complex<_Tp> - operator/(const complex<_Tp>& __x, const complex<_Tp>& __y) - { return complex<_Tp> (__x) /= __y; } - - template - inline complex<_Tp> - operator/(const complex<_Tp>& __x, const _Tp& __y) - { return complex<_Tp> (__x) /= __y; } - - template - inline complex<_Tp> - operator/(const _Tp& __x, const complex<_Tp>& __y) - { return complex<_Tp> (__x) /= __y; } - - template - inline complex<_Tp> - operator+(const complex<_Tp>& __x) - { return __x; } - - template - inline complex<_Tp> - operator-(const complex<_Tp>& __x) - { return complex<_Tp>(-__x.real(), -__x.imag()); } - - template - inline bool - operator==(const complex<_Tp>& __x, const complex<_Tp>& __y) - { return __x.real() == __y.real() && __x.imag() == __y.imag(); } - - template - inline bool - operator==(const complex<_Tp>& __x, const _Tp& __y) - { return __x.real() == __y && __x.imag() == _Tp(); } - - template - inline bool - operator==(const _Tp& __x, const complex<_Tp>& __y) - { return __x == __y.real() && _Tp() == __y.imag(); } - - template - inline bool - operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y) - { return __x.real() != __y.real() || __x.imag() != __y.imag(); } - - template - inline bool - operator!=(const complex<_Tp>& __x, const _Tp& __y) - { return __x.real() != __y || __x.imag() != _Tp(); } - - template - inline bool - operator!=(const _Tp& __x, const complex<_Tp>& __y) - { return __x != __y.real() || _Tp() != __y.imag(); } - - template - 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 - 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 - inline _Tp - real(const complex<_Tp>& __z) - { return __z.real(); } - - template - inline _Tp - imag(const complex<_Tp>& __z) - { return __z.imag(); } - - template - 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 - 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 - struct _Norm_helper - { - template - 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 - { - template - static inline _Tp _S_do_it(const complex<_Tp>& __z) - { - _Tp __res = abs(__z); - return __res * __res; - } - }; - - template - inline _Tp - norm(const complex<_Tp>& __z) - { - return _Norm_helper<__is_floating<_Tp>::_M_type>::_S_do_it(__z); - } - - template - inline complex<_Tp> - polar(const _Tp& __rho, const _Tp& __theta) - { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); } - - template - inline complex<_Tp> - conj(const complex<_Tp>& __z) - { return complex<_Tp>(__z.real(), -__z.imag()); } - - // Transcendentals - template - 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 - 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 - inline complex<_Tp> - exp(const complex<_Tp>& __z) - { return polar(exp(__z.real()), __z.imag()); } - - template - inline complex<_Tp> - log(const complex<_Tp>& __z) - { return complex<_Tp>(log(abs(__z)), arg(__z)); } - - template - inline complex<_Tp> - log10(const complex<_Tp>& __z) - { return log(__z) / log(_Tp(10.0)); } - - template - 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 - 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 - 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 - inline complex<_Tp> - tan(const complex<_Tp>& __z) - { - return sin(__z) / cos(__z); - } - - template - inline complex<_Tp> - tanh(const complex<_Tp>& __z) - { - return sinh(__z) / cosh(__z); - } - - template - inline complex<_Tp> - pow(const complex<_Tp>& __z, int __n) - { - return __pow_helper(__z, __n); - } - - template - inline complex<_Tp> - pow(const complex<_Tp>& __x, const _Tp& __y) - { - return exp(__y * log(__x)); - } - - template - inline complex<_Tp> - pow(const complex<_Tp>& __x, const complex<_Tp>& __y) - { - return exp(__y * log(__x)); - } - - template - inline complex<_Tp> - pow(const _Tp& __x, const complex<_Tp>& __y) - { - return exp(__y * log(__x)); - } - - // 26.2.3 complex specializations - // complex specialization - template<> class complex - { - 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&); - explicit complex(const complex&); - - float real() const; - float imag() const; - - complex& operator=(float); - complex& operator+=(float); - complex& operator-=(float); - complex& operator*=(float); - complex& operator/=(float); - - // Let's the compiler synthetize the copy and assignment - // operator. It always does a pretty good job. - // complex& operator= (const complex&); - template - complex&operator=(const complex<_Tp>&); - template - complex& operator+=(const complex<_Tp>&); - template - complex& operator-=(const complex<_Tp>&); - template - complex& operator*=(const complex<_Tp>&); - template - complex&operator/=(const complex<_Tp>&); - - private: - typedef __complex__ float _ComplexT; - _ComplexT _M_value; - - complex(_ComplexT __z) : _M_value(__z) { } - - friend class complex; - friend class complex; - }; - - inline float - complex::real() const - { return __real__ _M_value; } - - inline float - complex::imag() const - { return __imag__ _M_value; } - - inline - complex::complex(float r, float i) - { - __real__ _M_value = r; - __imag__ _M_value = i; - } - - inline complex& - complex::operator=(float __f) - { - __real__ _M_value = __f; - __imag__ _M_value = 0.0f; - return *this; - } - - inline complex& - complex::operator+=(float __f) - { - __real__ _M_value += __f; - return *this; - } - - inline complex& - complex::operator-=(float __f) - { - __real__ _M_value -= __f; - return *this; - } - - inline complex& - complex::operator*=(float __f) - { - _M_value *= __f; - return *this; - } - - inline complex& - complex::operator/=(float __f) - { - _M_value /= __f; - return *this; - } - - template - inline complex& - complex::operator=(const complex<_Tp>& __z) - { - __real__ _M_value = __z.real(); - __imag__ _M_value = __z.imag(); - return *this; - } - - template - inline complex& - complex::operator+=(const complex<_Tp>& __z) - { - __real__ _M_value += __z.real(); - __imag__ _M_value += __z.imag(); - return *this; - } - - template - inline complex& - complex::operator-=(const complex<_Tp>& __z) - { - __real__ _M_value -= __z.real(); - __imag__ _M_value -= __z.imag(); - return *this; - } - - template - inline complex& - complex::operator*=(const complex<_Tp>& __z) - { - _ComplexT __t; - __real__ __t = __z.real(); - __imag__ __t = __z.imag(); - _M_value *= __t; - return *this; - } - - template - inline complex& - complex::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 specialization - template<> class complex - { - 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&); - explicit complex(const complex&); - - double real() const; - double imag() const; - - complex& operator=(double); - complex& operator+=(double); - complex& operator-=(double); - complex& operator*=(double); - complex& operator/=(double); - - // The compiler will synthetize this, efficiently. - // complex& operator= (const complex&); - template - complex& operator=(const complex<_Tp>&); - template - complex& operator+=(const complex<_Tp>&); - template - complex& operator-=(const complex<_Tp>&); - template - complex& operator*=(const complex<_Tp>&); - template - complex& operator/=(const complex<_Tp>&); - - private: - typedef __complex__ double _ComplexT; - _ComplexT _M_value; - - complex(_ComplexT __z) : _M_value(__z) { } - - friend class complex; - friend class complex; - }; - - inline double - complex::real() const - { return __real__ _M_value; } - - inline double - complex::imag() const - { return __imag__ _M_value; } - - inline - complex::complex(double __r, double __i) - { - __real__ _M_value = __r; - __imag__ _M_value = __i; - } - - inline complex& - complex::operator=(double __d) - { - __real__ _M_value = __d; - __imag__ _M_value = 0.0; - return *this; - } - - inline complex& - complex::operator+=(double __d) - { - __real__ _M_value += __d; - return *this; - } - - inline complex& - complex::operator-=(double __d) - { - __real__ _M_value -= __d; - return *this; - } - - inline complex& - complex::operator*=(double __d) - { - _M_value *= __d; - return *this; - } - - inline complex& - complex::operator/=(double __d) - { - _M_value /= __d; - return *this; - } - - template - inline complex& - complex::operator=(const complex<_Tp>& __z) - { - __real__ _M_value = __z.real(); - __imag__ _M_value = __z.imag(); - return *this; - } - - template - inline complex& - complex::operator+=(const complex<_Tp>& __z) - { - __real__ _M_value += __z.real(); - __imag__ _M_value += __z.imag(); - return *this; - } - - template - inline complex& - complex::operator-=(const complex<_Tp>& __z) - { - __real__ _M_value -= __z.real(); - __imag__ _M_value -= __z.imag(); - return *this; - } - - template - inline complex& - complex::operator*=(const complex<_Tp>& __z) - { - _ComplexT __t; - __real__ __t = __z.real(); - __imag__ __t = __z.imag(); - _M_value *= __t; - return *this; - } - - template - inline complex& - complex::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 specialization - template<> class complex - { - 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&); - complex(const complex&); - - long double real() const; - long double imag() const; - - complex& operator= (long double); - complex& operator+= (long double); - complex& operator-= (long double); - complex& operator*= (long double); - complex& operator/= (long double); - - // The compiler knows how to do this efficiently - // complex& operator= (const complex&); - template - complex& operator=(const complex<_Tp>&); - template - complex& operator+=(const complex<_Tp>&); - template - complex& operator-=(const complex<_Tp>&); - template - complex& operator*=(const complex<_Tp>&); - template - complex& operator/=(const complex<_Tp>&); - - private: - typedef __complex__ long double _ComplexT; - _ComplexT _M_value; - - complex(_ComplexT __z) : _M_value(__z) { } - - friend class complex; - friend class complex; - }; - - inline - complex::complex(long double __r, long double __i) - { - __real__ _M_value = __r; - __imag__ _M_value = __i; - } - - inline long double - complex::real() const - { return __real__ _M_value; } - - inline long double - complex::imag() const - { return __imag__ _M_value; } - - inline complex& - complex::operator=(long double __r) - { - __real__ _M_value = __r; - __imag__ _M_value = 0.0L; - return *this; - } - - inline complex& - complex::operator+=(long double __r) - { - __real__ _M_value += __r; - return *this; - } - - inline complex& - complex::operator-=(long double __r) - { - __real__ _M_value -= __r; - return *this; - } - - inline complex& - complex::operator*=(long double __r) - { - _M_value *= __r; - return *this; - } - - inline complex& - complex::operator/=(long double __r) - { - _M_value /= __r; - return *this; - } - - template - inline complex& - complex::operator=(const complex<_Tp>& __z) - { - __real__ _M_value = __z.real(); - __imag__ _M_value = __z.imag(); - return *this; - } - - template - inline complex& - complex::operator+=(const complex<_Tp>& __z) - { - __real__ _M_value += __z.real(); - __imag__ _M_value += __z.imag(); - return *this; - } - - template - inline complex& - complex::operator-=(const complex<_Tp>& __z) - { - __real__ _M_value -= __z.real(); - __imag__ _M_value -= __z.imag(); - return *this; - } - - template - inline complex& - complex::operator*=(const complex<_Tp>& __z) - { - _ComplexT __t; - __real__ __t = __z.real(); - __imag__ __t = __z.imag(); - _M_value *= __t; - return *this; - } - - template - inline complex& - complex::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::complex(const complex& __z) - : _M_value(_ComplexT(__z._M_value)) { } - - inline - complex::complex(const complex& __z) - : _M_value(_ComplexT(__z._M_value)) { } - - inline - complex::complex(const complex& __z) - : _M_value(_ComplexT(__z._M_value)) { } - - inline - complex::complex(const complex& __z) - { - __real__ _M_value = __z.real(); - __imag__ _M_value = __z.imag(); - } - - inline - complex::complex(const complex& __z) - : _M_value(_ComplexT(__z._M_value)) { } - - inline - complex::complex(const complex& __z) - : _M_value(_ComplexT(__z._M_value)) { } -} // namespace std - -#endif /* _CPP_COMPLEX */ diff --git a/libstdc++-v3/include/bits/std_deque.h b/libstdc++-v3/include/bits/std_deque.h deleted file mode 100644 index 394eef3..0000000 --- a/libstdc++-v3/include/bits/std_deque.h +++ /dev/null @@ -1,77 +0,0 @@ -// -*- 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 -#include -#include -#include -#include -#include - -#endif /* _CPP_DEQUE */ - -// Local Variables: -// mode:C++ -// End: diff --git a/libstdc++-v3/include/bits/std_fstream.h b/libstdc++-v3/include/bits/std_fstream.h deleted file mode 100644 index 1a651b72..0000000 --- a/libstdc++-v3/include/bits/std_fstream.h +++ /dev/null @@ -1,434 +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 -#include -#include -#include // For codecvt -#include - -namespace std -{ - template - 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 __streambuf_type; - typedef basic_filebuf __filebuf_type; - typedef __basic_file __file_type; - typedef typename traits_type::state_type __state_type; - typedef codecvt __codecvt_type; - typedef typename __codecvt_type::result __res_type; - typedef ctype __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(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; - if (__testput) - { - // Make sure that libio resyncs its idea of the file position - // with the external file. - _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 - 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 __filebuf_type; - typedef basic_istream __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 - 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 __filebuf_type; - typedef basic_ostream __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()) - setstate(ios_base::failbit); - } - }; - - - // 27.8.1.11 Template class basic_fstream - template - 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 __filebuf_type; - typedef basic_ios __ios_type; - typedef basic_iostream __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 -#endif -#endif - -#endif - diff --git a/libstdc++-v3/include/bits/std_functional.h b/libstdc++-v3/include/bits/std_functional.h deleted file mode 100644 index 82863cc..0000000 --- a/libstdc++-v3/include/bits/std_functional.h +++ /dev/null @@ -1,62 +0,0 @@ -// -*- 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 -#include -#include - -#endif /* _CPP_FUNCTIONAL */ - -// Local Variables: -// mode:C++ -// End: - diff --git a/libstdc++-v3/include/bits/std_iomanip.h b/libstdc++-v3/include/bits/std_iomanip.h deleted file mode 100644 index ac83db3..0000000 --- a/libstdc++-v3/include/bits/std_iomanip.h +++ /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 -#include -#include - -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 - basic_istream<_CharT,_Traits>& - operator>>(basic_istream<_CharT,_Traits>& __is, _Resetiosflags __f) - { - __is.setf(ios_base::fmtflags(0), __f._M_mask); - return __is; - } - - template - 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 - basic_istream<_CharT,_Traits>& - operator>>(basic_istream<_CharT,_Traits>& __is, _Setiosflags __f) - { - __is.setf(__f._M_mask); - return __is; - } - - template - 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 - 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 - 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 - struct _Setfill { _CharT _M_c; }; - - template - _Setfill<_CharT> - setfill(_CharT __c) - { - _Setfill<_CharT> __x; - __x._M_c = __c; - return __x; - } - - template - basic_istream<_CharT,_Traits>& - operator>>(basic_istream<_CharT,_Traits>& __is, _Setfill<_CharT> __f) - { - __is.fill(__f._M_c); - return __is; - } - - template - 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 - basic_istream<_CharT,_Traits>& - operator>>(basic_istream<_CharT,_Traits>& __is, _Setprecision __f) - { - __is.precision(__f._M_n); - return __is; - } - - template - 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 - basic_istream<_CharT,_Traits>& - operator>>(basic_istream<_CharT,_Traits>& __is, _Setw __f) - { - __is.width(__f._M_n); - return __is; - } - - template - 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/bits/std_ios.h b/libstdc++-v3/include/bits/std_ios.h deleted file mode 100644 index dfd041f..0000000 --- a/libstdc++-v3/include/bits/std_ios.h +++ /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 -#include // For ios_base::failure -#include // For char_traits, streamoff, streamsize, fpos -#include // For SEEK_SET, SEEK_CUR, SEEK_END -#include // For class locale -#include // For ios_base declarations. -#include -#include - -#endif /* _CPP_IOS */ - diff --git a/libstdc++-v3/include/bits/std_iosfwd.h b/libstdc++-v3/include/bits/std_iosfwd.h deleted file mode 100644 index 93c30b3..0000000 --- a/libstdc++-v3/include/bits/std_iosfwd.h +++ /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 -#include // For string forward declarations. -#include -#include - -namespace std -{ - template > - class basic_ios; - - template > - class basic_streambuf; - - template > - class basic_istream; - - template > - class basic_ostream; - - template > - class basic_iostream; - - template, - typename _Alloc = allocator<_CharT> > - class basic_stringbuf; - - template, - typename _Alloc = allocator<_CharT> > - class basic_istringstream; - - template, - typename _Alloc = allocator<_CharT> > - class basic_ostringstream; - - template, - typename _Alloc = allocator<_CharT> > - class basic_stringstream; - - template > - class basic_filebuf; - - template > - class basic_ifstream; - - template > - class basic_ofstream; - - template > - class basic_fstream; - - template > - class istreambuf_iterator; - - template > - class ostreambuf_iterator; - -#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS - // Not included. (??? Apparently no LWG number?) - class ios_base; -#endif - - typedef basic_ios ios; - typedef basic_streambuf streambuf; - typedef basic_istream istream; - typedef basic_ostream ostream; - typedef basic_iostream iostream; - typedef basic_stringbuf stringbuf; - typedef basic_istringstream istringstream; - typedef basic_ostringstream ostringstream; - typedef basic_stringstream stringstream; - typedef basic_filebuf filebuf; - typedef basic_ifstream ifstream; - typedef basic_ofstream ofstream; - typedef basic_fstream fstream; - -#ifdef _GLIBCPP_USE_WCHAR_T - typedef basic_ios wios; - typedef basic_streambuf wstreambuf; - typedef basic_istream wistream; - typedef basic_ostream wostream; - typedef basic_iostream wiostream; - typedef basic_stringbuf wstringbuf; - typedef basic_istringstream wistringstream; - typedef basic_ostringstream wostringstream; - typedef basic_stringstream wstringstream; - typedef basic_filebuf wfilebuf; - typedef basic_ifstream wifstream; - typedef basic_ofstream wofstream; - typedef basic_fstream wfstream; -#endif -} // namespace std - -#endif diff --git a/libstdc++-v3/include/bits/std_iostream.h b/libstdc++-v3/include/bits/std_iostream.h deleted file mode 100644 index 32893fa..0000000 --- a/libstdc++-v3/include/bits/std_iostream.h +++ /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 -#include -#include - -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/bits/std_istream.h b/libstdc++-v3/include/bits/std_istream.h deleted file mode 100644 index 4afbbc0..0000000 --- a/libstdc++-v3/include/bits/std_istream.h +++ /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 -#include // For numeric_limits - -namespace std -{ - // 27.6.1.1 Template class basic_istream - template - 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 - 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 - basic_istream<_CharT, _Traits>& - operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); - - template - basic_istream& - operator>>(basic_istream& __in, unsigned char& __c) - { return (__in >> reinterpret_cast(__c)); } - - template - basic_istream& - operator>>(basic_istream& __in, signed char& __c) - { return (__in >> reinterpret_cast(__c)); } - - template - basic_istream<_CharT, _Traits>& - operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); - - template - basic_istream& - operator>>(basic_istream& __in, unsigned char* __s) - { return (__in >> reinterpret_cast(__s)); } - - template - basic_istream& - operator>>(basic_istream& __in, signed char* __s) - { return (__in >> reinterpret_cast(__s)); } - - // 27.6.1.5 Template class basic_iostream - template - 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 - 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 -#endif -#endif - -#endif /* _CPP_ISTREAM */ diff --git a/libstdc++-v3/include/bits/std_iterator.h b/libstdc++-v3/include/bits/std_iterator.h deleted file mode 100644 index 3e3541c..0000000 --- a/libstdc++-v3/include/bits/std_iterator.h +++ /dev/null @@ -1,79 +0,0 @@ -// -*- 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 -#include -#include -#include -#include -#include -#include -#include -#include - -#endif /* _CPP_ITERATOR */ - -// Local Variables: -// mode:C++ -// End: diff --git a/libstdc++-v3/include/bits/std_limits.h b/libstdc++-v3/include/bits/std_limits.h deleted file mode 100644 index 7a64636..0000000 --- a/libstdc++-v3/include/bits/std_limits.h +++ /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 - -// -// 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 -#include - -// -// 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 - 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 - const bool - numeric_limits<_Tp>::is_specialized; - - template - const int - numeric_limits<_Tp>::digits; - - template - const int - numeric_limits<_Tp>::digits10; - - template - const bool - numeric_limits<_Tp>::is_signed; - - template - const bool - numeric_limits<_Tp>::is_integer; - - template - const bool - numeric_limits<_Tp>::is_exact; - - template - const int - numeric_limits<_Tp>::radix; - - template - const int - numeric_limits<_Tp>::min_exponent; - - template - const int - numeric_limits<_Tp>::min_exponent10; - - template - const int - numeric_limits<_Tp>::max_exponent; - - template - const int - numeric_limits<_Tp>::max_exponent10; - - template - const bool - numeric_limits<_Tp>::has_infinity; - - template - const bool - numeric_limits<_Tp>::has_quiet_NaN; - - template - const bool - numeric_limits<_Tp>::has_signaling_NaN; - - template - const float_denorm_style - numeric_limits<_Tp>::has_denorm; - - template - const bool - numeric_limits<_Tp>::has_denorm_loss; - - template - const bool - numeric_limits<_Tp>::is_iec559; - - template - const bool - numeric_limits<_Tp>::is_bounded; - - template - const bool - numeric_limits<_Tp>::is_modulo; - - template - const bool - numeric_limits<_Tp>::traps; - - template - const bool - numeric_limits<_Tp>::tinyness_before; - - template - 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 - { - 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 - { - 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(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 - { - 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(0); } - static signed char quiet_NaN() throw() - { return static_cast(0); } - static signed char signaling_NaN() throw() - { return static_cast(0); } - static signed char denorm_min() throw() - { return static_cast(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 - { - 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(0); } - static unsigned char quiet_NaN() throw() - { return static_cast(0); } - static unsigned char signaling_NaN() throw() - { return static_cast(0); } - static unsigned char denorm_min() throw() - { return static_cast(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 - { - 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 - { - 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 - { - 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(0); } - static unsigned short quiet_NaN() throw() - { return static_cast(0); } - static unsigned short signaling_NaN() throw() - { return static_cast(0); } - static unsigned short denorm_min() throw() - { return static_cast(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 - { - 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(0); } - static int quiet_NaN() throw() - { return static_cast(0); } - static int signaling_NaN() throw() - { return static_cast(0); } - static int denorm_min() throw() - { return static_cast(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 - { - 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(0); } - static unsigned int quiet_NaN() throw() - { return static_cast(0); } - static unsigned int signaling_NaN() throw() - { return static_cast(0); } - static unsigned int denorm_min() throw() - { return static_cast(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 - { - 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(0); } - static long quiet_NaN() throw() - { return static_cast(0); } - static long signaling_NaN() throw() - { return static_cast(0); } - static long denorm_min() throw() - { return static_cast(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 - { - 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(0); } - static unsigned long quiet_NaN() throw() - { return static_cast(0); } - static unsigned long signaling_NaN() throw() - { return static_cast(0); } - static unsigned long denorm_min() throw() - { return static_cast(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 - { - 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(0); } - static long long quiet_NaN() throw() - { return static_cast(0); } - static long long signaling_NaN() throw() - { return static_cast(0); } - static long long denorm_min() throw() - { return static_cast(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 - { - 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(0); } - static unsigned long long quiet_NaN() throw() - { return static_cast(0); } - static unsigned long long signaling_NaN() throw() - { return static_cast(0); } - static unsigned long long denorm_min() throw() - { return static_cast(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 - { - 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 - { - 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 - { - 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/bits/std_list.h b/libstdc++-v3/include/bits/std_list.h deleted file mode 100644 index 683e0a7..0000000 --- a/libstdc++-v3/include/bits/std_list.h +++ /dev/null @@ -1,77 +0,0 @@ -// -*- 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 -#include -#include -#include -#include -#include - -#endif /* _CPP_LIST */ - -// Local Variables: -// mode:C++ -// End: diff --git a/libstdc++-v3/include/bits/std_locale.h b/libstdc++-v3/include/bits/std_locale.h deleted file mode 100644 index 82089d0..0000000 --- a/libstdc++-v3/include/bits/std_locale.h +++ /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 -#include -#include - -#endif - -// Local Variables: -// mode:c++ -// End: diff --git a/libstdc++-v3/include/bits/std_map.h b/libstdc++-v3/include/bits/std_map.h deleted file mode 100644 index 0dd38bf..0000000 --- a/libstdc++-v3/include/bits/std_map.h +++ /dev/null @@ -1,74 +0,0 @@ -// -*- 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 -#include -#include - -#endif /* _CPP_MAP */ - -// Local Variables: -// mode:C++ -// End: diff --git a/libstdc++-v3/include/bits/std_memory.h b/libstdc++-v3/include/bits/std_memory.h deleted file mode 100644 index c9a2e59..0000000 --- a/libstdc++-v3/include/bits/std_memory.h +++ /dev/null @@ -1,149 +0,0 @@ -// -*- 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 -#include -#include -#include //for iterator_traits -#include -#include -#include - -namespace std -{ - - template 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 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 auto_ptr(auto_ptr<_Tp1>& __a) throw() - : _M_ptr(__a.release()) {} - - auto_ptr& operator=(auto_ptr& __a) throw() { - reset(__a.release()); - return *this; - } - - template - 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 operator auto_ptr_ref<_Tp1>() throw() - { return auto_ptr_ref<_Tp>(this->release()); } - template 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/bits/std_numeric.h b/libstdc++-v3/include/bits/std_numeric.h deleted file mode 100644 index 097c9c3..0000000 --- a/libstdc++-v3/include/bits/std_numeric.h +++ /dev/null @@ -1,75 +0,0 @@ -// -*- 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 -#include -#include -#include -#include - -#endif /* _CPP_NUMERIC */ - -// Local Variables: -// mode:C++ -// End: diff --git a/libstdc++-v3/include/bits/std_ostream.h b/libstdc++-v3/include/bits/std_ostream.h deleted file mode 100644 index c1c79db..0000000 --- a/libstdc++-v3/include/bits/std_ostream.h +++ /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 - -namespace std -{ - // 27.6.2.1 Template class basic_ostream - template - 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 - (static_cast(__n))); - else - return this->operator<<(static_cast(__n)); - } - - __ostream_type& - operator<<(unsigned short __n) - { return this->operator<<(static_cast(__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 - (static_cast(__n))); - else - return this->operator<<(static_cast(__n)); - } - - __ostream_type& - operator<<(unsigned int __n) - { return this->operator<<(static_cast(__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(__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 - 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 - basic_ostream<_CharT, _Traits>& - operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c); - - template - basic_ostream<_CharT, _Traits>& - operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) - { return (__out << __out.widen(__c)); } - - // Specialization - template - basic_ostream& - operator<<(basic_ostream& __out, char __c); - - // Signed and unsigned - template - basic_ostream& - operator<<(basic_ostream& __out, signed char __c) - { return (__out << static_cast(__c)); } - - template - basic_ostream& - operator<<(basic_ostream& __out, unsigned char __c) - { return (__out << static_cast(__c)); } - - template - basic_ostream<_CharT, _Traits>& - operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s); - - template - basic_ostream<_CharT, _Traits> & - operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); - - // Partial specializationss - template - basic_ostream& - operator<<(basic_ostream& __out, const char* __s); - - // Signed and unsigned - template - basic_ostream& - operator<<(basic_ostream& __out, const signed char* __s) - { return (__out << reinterpret_cast(__s)); } - - template - basic_ostream & - operator<<(basic_ostream& __out, const unsigned char* __s) - { return (__out << reinterpret_cast(__s)); } - - // 27.6.2.7 Standard basic_ostream manipulators - template - basic_ostream<_CharT, _Traits>& - endl(basic_ostream<_CharT, _Traits>& __os) - { return flush(__os.put(__os.widen('\n'))); } - - template - basic_ostream<_CharT, _Traits>& - ends(basic_ostream<_CharT, _Traits>& __os) - { return __os.put(_CharT()); } - - template - 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 -#endif -#endif - -#endif /* _CPP_OSTREAM */ - diff --git a/libstdc++-v3/include/bits/std_queue.h b/libstdc++-v3/include/bits/std_queue.h deleted file mode 100644 index ecf7f4c..0000000 --- a/libstdc++-v3/include/bits/std_queue.h +++ /dev/null @@ -1,81 +0,0 @@ -// -*- 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif /* _CPP_QUEUE */ - -// Local Variables: -// mode:C++ -// End: diff --git a/libstdc++-v3/include/bits/std_set.h b/libstdc++-v3/include/bits/std_set.h deleted file mode 100644 index dab8e71..0000000 --- a/libstdc++-v3/include/bits/std_set.h +++ /dev/null @@ -1,74 +0,0 @@ -// -*- 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 -#include -#include - -#endif /* _CPP_SET */ - -// Local Variables: -// mode:C++ -// End: diff --git a/libstdc++-v3/include/bits/std_sstream.h b/libstdc++-v3/include/bits/std_sstream.h deleted file mode 100644 index d36070a..0000000 --- a/libstdc++-v3/include/bits/std_sstream.h +++ /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 -#include - -namespace std -{ - template - 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 __streambuf_type; - typedef basic_string __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(_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 - 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 __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 - 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 __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 - 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 __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 -#endif -#endif - -#endif // _CPP_SSTREAM diff --git a/libstdc++-v3/include/bits/std_stack.h b/libstdc++-v3/include/bits/std_stack.h deleted file mode 100644 index 166f428..0000000 --- a/libstdc++-v3/include/bits/std_stack.h +++ /dev/null @@ -1,77 +0,0 @@ -// -*- 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 -#include -#include -#include -#include -#include - -#endif /* _CPP_STACK */ - -// Local Variables: -// mode:C++ -// End: diff --git a/libstdc++-v3/include/bits/std_stdexcept.h b/libstdc++-v3/include/bits/std_stdexcept.h deleted file mode 100644 index 66bac50..0000000 --- a/libstdc++-v3/include/bits/std_stdexcept.h +++ /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 -#include - -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/bits/std_streambuf.h b/libstdc++-v3/include/bits/std_streambuf.h deleted file mode 100644 index 8ef20ff..0000000 --- a/libstdc++-v3/include/bits/std_streambuf.h +++ /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 -#include -#include // For SEEK_SET, SEEK_CUR, SEEK_END -#include -#include - -namespace std -{ - template - 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 - 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 __ctype_type; - typedef basic_streambuf __streambuf_type; - - friend class basic_ios; - friend class basic_istream; - friend class basic_ostream; - friend class istreambuf_iterator; - friend class ostreambuf_iterator; - - friend streamsize - __copy_streambufs<>(basic_ios& __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(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* - 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 -#endif -#endif - -#endif /* _CPP_STREAMBUF */ - diff --git a/libstdc++-v3/include/bits/std_string.h b/libstdc++-v3/include/bits/std_string.h deleted file mode 100644 index d93fa20..0000000 --- a/libstdc++-v3/include/bits/std_string.h +++ /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 -#include -#include -#include // For allocator. -#include -#include // For operators >>, <<, and getline decls. -#include -#include // For less -#include - -#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT -# include // for find_if -# include -#endif - -#endif /* _CPP_STRING */ - diff --git a/libstdc++-v3/include/bits/std_utility.h b/libstdc++-v3/include/bits/std_utility.h deleted file mode 100644 index 5917c83..0000000 --- a/libstdc++-v3/include/bits/std_utility.h +++ /dev/null @@ -1,73 +0,0 @@ -// -*- 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 -#include -#include - -#endif /* _CPP_UTILITY */ - -// Local Variables: -// mode:C++ -// End: diff --git a/libstdc++-v3/include/bits/std_valarray.h b/libstdc++-v3/include/bits/std_valarray.h deleted file mode 100644 index 5f4c112..0000000 --- a/libstdc++-v3/include/bits/std_valarray.h +++ /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 - -/** @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 -#include -#include -#include -#include -#include -#include - -namespace std -{ - template class _Expr; - - template class _ValArray; - - template class _Oper, - template class _Meta, class _Dom> struct _UnClos; - - template class _Oper, - template class _Meta1, - template class _Meta2, - class _Dom1, class _Dom2> class _BinClos; - - template class _Meta, class _Dom> class _SClos; - - template class _Meta, class _Dom> class _GClos; - - template class _Meta, class _Dom> class _IClos; - - template class _Meta, class _Dom> class _ValFunClos; - - template class _Meta, class _Dom> class _RefFunClos; - - template struct _Unary_plus; - template struct _Bitwise_and; - template struct _Bitwise_or; - template struct _Bitwise_xor; - template struct _Bitwise_not; - template struct _Shift_left; - template struct _Shift_right; - - template class valarray; // An array of type _Tp - class slice; // BLAS-like slice out of an array - template class slice_array; - class gslice; // generalized slice out of an array - template class gslice_array; - template class mask_array; // masked array - template class indirect_array; // indirected array - -} // namespace std - -#include -#include - -namespace std -{ - template 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 - 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 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&) const; - mask_array<_Tp> operator[](const valarray&); - _Expr<_IClos<_ValArray, _Tp>, _Tp> - operator[](const valarray&) const; - indirect_array<_Tp> operator[](const valarray&); - - // _lib.valarray.unary_ unary operators: - _Expr<_UnClos<_Unary_plus,_ValArray,_Tp>,_Tp> operator+ () const; - _Expr<_UnClos,_Tp> operator- () const; - _Expr<_UnClos<_Bitwise_not,_ValArray,_Tp>,_Tp> operator~ () const; - _Expr<_UnClos,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 - valarray<_Tp>& operator*= (const _Expr<_Dom,_Tp>&); - template - valarray<_Tp>& operator/= (const _Expr<_Dom,_Tp>&); - template - valarray<_Tp>& operator%= (const _Expr<_Dom,_Tp>&); - template - valarray<_Tp>& operator+= (const _Expr<_Dom,_Tp>&); - template - valarray<_Tp>& operator-= (const _Expr<_Dom,_Tp>&); - template - valarray<_Tp>& operator^= (const _Expr<_Dom,_Tp>&); - template - valarray<_Tp>& operator|= (const _Expr<_Dom,_Tp>&); - template - valarray<_Tp>& operator&= (const _Expr<_Dom,_Tp>&); - template - valarray<_Tp>& operator<<=(const _Expr<_Dom,_Tp>&); - template - 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 struct _Unary_plus : unary_function<_Tp,_Tp> { - _Tp operator() (const _Tp& __t) const { return __t; } - }; - - template struct _Bitwise_and : binary_function<_Tp,_Tp,_Tp> { - _Tp operator() (_Tp __x, _Tp __y) const { return __x & __y; } - }; - - template struct _Bitwise_or : binary_function<_Tp,_Tp,_Tp> { - _Tp operator() (_Tp __x, _Tp __y) const { return __x | __y; } - }; - - template struct _Bitwise_xor : binary_function<_Tp,_Tp,_Tp> { - _Tp operator() (_Tp __x, _Tp __y) const { return __x ^ __y; } - }; - - template struct _Bitwise_not : unary_function<_Tp,_Tp> { - _Tp operator() (_Tp __t) const { return ~__t; } - }; - - template struct _Shift_left : unary_function<_Tp,_Tp> { - _Tp operator() (_Tp __x, _Tp __y) const { return __x << __y; } - }; - - template struct _Shift_right : unary_function<_Tp,_Tp> { - _Tp operator() (_Tp __x, _Tp __y) const { return __x >> __y; } - }; - - - template - inline const _Tp& - valarray<_Tp>::operator[] (size_t __i) const - { return _M_data[__i]; } - - template - inline _Tp& - valarray<_Tp>::operator[] (size_t __i) - { return _M_data[__i]; } - -} // std:: - -#include -#include -#include -#include -#include -#include - -namespace std -{ - template - inline valarray<_Tp>::valarray () : _M_size (0), _M_data (0) {} - - template - 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 - 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 - 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 - 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 - 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 - 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(__ga._M_index), - _Array<_Tp>(_M_data), _M_size); - } - - template - 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 - 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 template - 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 - inline valarray<_Tp>::~valarray () - { - __valarray_destroy_elements(_M_data, _M_data + _M_size); - __valarray_release_memory(_M_data); - } - - template - inline valarray<_Tp>& - valarray<_Tp>::operator= (const valarray<_Tp>& __v) - { - __valarray_copy(__v._M_data, _M_size, _M_data); - return *this; - } - - template - inline valarray<_Tp>& - valarray<_Tp>::operator= (const _Tp& __t) - { - __valarray_fill (_M_data, _M_size, __t); - return *this; - } - - template - 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 - inline valarray<_Tp>& - valarray<_Tp>::operator= (const gslice_array<_Tp>& __ga) - { - __valarray_copy (__ga._M_array, _Array(__ga._M_index), - _Array<_Tp>(_M_data), _M_size); - return *this; - } - - template - 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 - 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 template - inline valarray<_Tp>& - valarray<_Tp>::operator= (const _Expr<_Dom, _Tp>& __e) - { - __valarray_copy (__e, _M_size, _Array<_Tp>(_M_data)); - return *this; - } - - template - 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 - inline slice_array<_Tp> - valarray<_Tp>::operator[] (slice __s) - { - return slice_array<_Tp> (_Array<_Tp>(_M_data), __s); - } - - template - 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 - inline gslice_array<_Tp> - valarray<_Tp>::operator[] (const gslice& __gs) - { - return gslice_array<_Tp> - (_Array<_Tp>(_M_data), __gs._M_index->_M_index); - } - - template - inline valarray<_Tp> - valarray<_Tp>::operator[] (const valarray& __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 (__m))); - } - - template - inline mask_array<_Tp> - valarray<_Tp>::operator[] (const valarray& __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 (__m)); - } - - template - inline _Expr<_IClos<_ValArray,_Tp>, _Tp> - valarray<_Tp>::operator[] (const valarray& __i) const - { - typedef _IClos<_ValArray,_Tp> _Closure; - return _Expr<_Closure, _Tp> (_Closure (*this, __i)); - } - - template - inline indirect_array<_Tp> - valarray<_Tp>::operator[] (const valarray& __i) - { - return indirect_array<_Tp> (_Array<_Tp>(_M_data), __i.size(), - _Array (__i)); - } - - template - inline size_t valarray<_Tp>::size () const { return _M_size; } - - template - inline _Tp - valarray<_Tp>::sum () const - { - return __valarray_sum(_M_data, _M_data + _M_size); - } - -// template -// inline _Tp -// valarray<_Tp>::product () const -// { -// return __valarray_product(_M_data, _M_data + _M_size); -// } - - template - 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 - 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 - inline void - valarray<_Tp>::resize (size_t __n, _Tp __c) - { - // This complication is so to make valarray > work - // even though it is not required by the standard. Nobody should - // be saying valarray > 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 - inline _Tp - valarray<_Tp>::min() const - { - return *min_element (_M_data, _M_data+_M_size); - } - - template - inline _Tp - valarray<_Tp>::max() const - { - return *max_element (_M_data, _M_data+_M_size); - } - - template - 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 - 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 \ - 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 - inline _Expr<_UnClos, bool> - valarray<_Tp>::operator!() const - { - typedef _UnClos _Closure; - return _Expr<_Closure, bool> (_Closure (*this)); - } - -#define _DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(_Op, _Name) \ - template \ - inline valarray<_Tp> & \ - valarray<_Tp>::operator _Op##= (const _Tp &__t) \ - { \ - _Array_augmented_##_Name (_Array<_Tp>(_M_data), _M_size, __t); \ - return *this; \ - } \ - \ - template \ - 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 template \ - 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 \ - 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 \ - 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 \ - 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 \ - 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 \ - 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 \ - 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/bits/std_vector.h b/libstdc++-v3/include/bits/std_vector.h deleted file mode 100644 index 995daec..0000000 --- a/libstdc++-v3/include/bits/std_vector.h +++ /dev/null @@ -1,78 +0,0 @@ -// -*- 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 -#include -#include -#include -#include -#include -#include - -#endif /* _CPP_VECTOR */ - -// Local Variables: -// mode:C++ -// End: diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h index 2453976..6e488ea 100644 --- a/libstdc++-v3/include/bits/stl_algobase.h +++ b/libstdc++-v3/include/bits/stl_algobase.h @@ -1,6 +1,6 @@ // Bits and pieces used in algorithms -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002 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 @@ -62,15 +62,14 @@ #define __GLIBCPP_INTERNAL_ALGOBASE_H #include +#include +#include +#include +#include +#include +#include #include #include -#include -#include -#include -#include -#include - -#include #include #include #include @@ -78,7 +77,6 @@ namespace std { - // swap and iter_swap /** diff --git a/libstdc++-v3/include/bits/stl_alloc.h b/libstdc++-v3/include/bits/stl_alloc.h index 751dffe..66d2ef6 100644 --- a/libstdc++-v3/include/bits/stl_alloc.h +++ b/libstdc++-v3/include/bits/stl_alloc.h @@ -78,12 +78,11 @@ * or online at http://gcc.gnu.org/onlinedocs/libstdc++/ext/howto.html#3 */ - -#include // for __throw_bad_alloc -#include -#include -#include -#include +#include +#include +#include +#include +#include // For __throw_bad_alloc #include namespace std diff --git a/libstdc++-v3/include/bits/stl_uninitialized.h b/libstdc++-v3/include/bits/stl_uninitialized.h index f679d52..866b20b 100644 --- a/libstdc++-v3/include/bits/stl_uninitialized.h +++ b/libstdc++-v3/include/bits/stl_uninitialized.h @@ -61,7 +61,7 @@ #ifndef _CPP_BITS_STL_UNINITIALIZED_H #define _CPP_BITS_STL_UNINITIALIZED_H 1 -#include +#include namespace std { diff --git a/libstdc++-v3/include/bits/valarray_array.h b/libstdc++-v3/include/bits/valarray_array.h index 1ef10e6..5b425e4 100644 --- a/libstdc++-v3/include/bits/valarray_array.h +++ b/libstdc++-v3/include/bits/valarray_array.h @@ -41,8 +41,8 @@ #include #include -#include -#include +#include +#include #include namespace std diff --git a/libstdc++-v3/include/c/bits/std_cassert.h b/libstdc++-v3/include/c/bits/std_cassert.h deleted file mode 100644 index 3292838..0000000 --- a/libstdc++-v3/include/c/bits/std_cassert.h +++ /dev/null @@ -1,39 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 2000 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: 19.2 Assertions -// - -// Note: This is not a conforming implementation. - -// No include guards on this header... - -#pragma GCC system_header -#include diff --git a/libstdc++-v3/include/c/bits/std_cctype.h b/libstdc++-v3/include/c/bits/std_cctype.h deleted file mode 100644 index 5a423a0..0000000 --- a/libstdc++-v3/include/c/bits/std_cctype.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 2000 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: -// - -// Note: This is not a conforming implementation. - -#ifndef _CPP_CCTYPE -#define _CPP_CCTYPE 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c/bits/std_cerrno.h b/libstdc++-v3/include/c/bits/std_cerrno.h deleted file mode 100644 index 23a0060..0000000 --- a/libstdc++-v3/include/c/bits/std_cerrno.h +++ /dev/null @@ -1,42 +0,0 @@ -// The -*- C++ -*- error number header. - -// Copyright (C) 2000 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: 19.3 Error numbers -// - -// Note: This is not a conforming implementation. - -#ifndef _CPP_CERRNO -#define _CPP_CERRNO 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c/bits/std_cfloat.h b/libstdc++-v3/include/c/bits/std_cfloat.h deleted file mode 100644 index 7446997..0000000 --- a/libstdc++-v3/include/c/bits/std_cfloat.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 2000 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: 18.2.2 Implementation properties: C library -// - -// Note: This is not a conforming implementation. - -#ifndef _CPP_CFLOAT -#define _CPP_CFLOAT 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c/bits/std_climits.h b/libstdc++-v3/include/c/bits/std_climits.h deleted file mode 100644 index 05795a6..0000000 --- a/libstdc++-v3/include/c/bits/std_climits.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 2000 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: 18.2.2 Implementation properties: C library -// - -// Note: This is not a conforming implementation. - -#ifndef _CPP_CLIMITS -#define _CPP_CLIMITS 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c/bits/std_clocale.h b/libstdc++-v3/include/c/bits/std_clocale.h deleted file mode 100644 index 69ea1f6..0000000 --- a/libstdc++-v3/include/c/bits/std_clocale.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 2000 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: 18.2.2 Implementation properties: C library -// - -// Note: This is not a conforming implementation. - -#ifndef _CPP_CLOCALE -#define _CPP_CLOCALE 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c/bits/std_cmath.h b/libstdc++-v3/include/c/bits/std_cmath.h deleted file mode 100644 index 2625eac..0000000 --- a/libstdc++-v3/include/c/bits/std_cmath.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- C++ -*- C math library. - -// Copyright (C) 2000 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.5 C library -// - -// Note: This is not a conforming implementation. - -#ifndef _CPP_CMATH -#define _CPP_CMATH 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c/bits/std_csetjmp.h b/libstdc++-v3/include/c/bits/std_csetjmp.h deleted file mode 100644 index 45e3da5..0000000 --- a/libstdc++-v3/include/c/bits/std_csetjmp.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 2000 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: 20.4.6 C library -// - -// Note: This is not a conforming implementation. - -#ifndef _CPP_CSETJMP -#define _CPP_CSETJMP 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c/bits/std_csignal.h b/libstdc++-v3/include/c/bits/std_csignal.h deleted file mode 100644 index da585dd..0000000 --- a/libstdc++-v3/include/c/bits/std_csignal.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 2000 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: 20.4.6 C library -// - -// Note: This is not a conforming implementation. - -#ifndef _CPP_CSIGNAL -#define _CPP_CSIGNAL 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c/bits/std_cstdarg.h b/libstdc++-v3/include/c/bits/std_cstdarg.h deleted file mode 100644 index 5d2a2d8..0000000 --- a/libstdc++-v3/include/c/bits/std_cstdarg.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 2000 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: 20.4.6 C library -// - -// Note: This is not a conforming implementation. - -#ifndef _CPP_CSTDARG -#define _CPP_CSTDARG 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c/bits/std_cstddef.h b/libstdc++-v3/include/c/bits/std_cstddef.h deleted file mode 100644 index 456f6ca..0000000 --- a/libstdc++-v3/include/c/bits/std_cstddef.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 2000 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: 18.1 Types -// - -// Note: This is not a conforming implementation. - -#ifndef _CPP_CSTDDEF -#define _CPP_CSTDDEF 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c/bits/std_cstdio.h b/libstdc++-v3/include/c/bits/std_cstdio.h deleted file mode 100644 index b7b2970..0000000 --- a/libstdc++-v3/include/c/bits/std_cstdio.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 2000 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.2 C Library files -// - -// Note: This is not a conforming implementation. - -#ifndef _CPP_CSTDIO -#define _CPP_CSTDIO 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c/bits/std_cstdlib.h b/libstdc++-v3/include/c/bits/std_cstdlib.h deleted file mode 100644 index 75402e4..0000000 --- a/libstdc++-v3/include/c/bits/std_cstdlib.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 2000 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: 20.4.6 C library -// - -// Note: This is not a conforming implementation. - -#ifndef _CPP_CSTDLIB -#define _CPP_CSTDLIB 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c/bits/std_cstring.h b/libstdc++-v3/include/c/bits/std_cstring.h deleted file mode 100644 index 6a17655..0000000 --- a/libstdc++-v3/include/c/bits/std_cstring.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 2000 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: 20.4.6 C library -// - -// Note: This is not a conforming implementation. - -#ifndef _CPP_CSTRING -#define _CPP_CSTRING 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c/bits/std_ctime.h b/libstdc++-v3/include/c/bits/std_ctime.h deleted file mode 100644 index bf53c50..0000000 --- a/libstdc++-v3/include/c/bits/std_ctime.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 2000 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: 20.5 Date and time -// - -// Note: This is not a conforming implementation. - -#ifndef _CPP_CTIME -#define _CPP_CTIME 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c/bits/std_cwchar.h b/libstdc++-v3/include/c/bits/std_cwchar.h deleted file mode 100644 index 713f444..0000000 --- a/libstdc++-v3/include/c/bits/std_cwchar.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 2000 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: ??? -// - -// Note: This is not a conforming implementation. - -#ifndef _CPP_CWCHAR -#define _CPP_CWCHAR 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c/bits/std_cwctype.h b/libstdc++-v3/include/c/bits/std_cwctype.h deleted file mode 100644 index 6f8a7c8..0000000 --- a/libstdc++-v3/include/c/bits/std_cwctype.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 2000 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: -// - -// Note: This is not a conforming implementation. - -#ifndef _CPP_CWCTYPE -#define _CPP_CWCTYPE 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c/cassert b/libstdc++-v3/include/c/cassert new file mode 100644 index 0000000..3292838 --- /dev/null +++ b/libstdc++-v3/include/c/cassert @@ -0,0 +1,39 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 2000 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: 19.2 Assertions +// + +// Note: This is not a conforming implementation. + +// No include guards on this header... + +#pragma GCC system_header +#include diff --git a/libstdc++-v3/include/c/cctype b/libstdc++-v3/include/c/cctype new file mode 100644 index 0000000..5a423a0 --- /dev/null +++ b/libstdc++-v3/include/c/cctype @@ -0,0 +1,42 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 2000 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: +// + +// Note: This is not a conforming implementation. + +#ifndef _CPP_CCTYPE +#define _CPP_CCTYPE 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c/cerrno b/libstdc++-v3/include/c/cerrno new file mode 100644 index 0000000..23a0060 --- /dev/null +++ b/libstdc++-v3/include/c/cerrno @@ -0,0 +1,42 @@ +// The -*- C++ -*- error number header. + +// Copyright (C) 2000 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: 19.3 Error numbers +// + +// Note: This is not a conforming implementation. + +#ifndef _CPP_CERRNO +#define _CPP_CERRNO 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c/cfloat b/libstdc++-v3/include/c/cfloat new file mode 100644 index 0000000..7446997 --- /dev/null +++ b/libstdc++-v3/include/c/cfloat @@ -0,0 +1,42 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 2000 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: 18.2.2 Implementation properties: C library +// + +// Note: This is not a conforming implementation. + +#ifndef _CPP_CFLOAT +#define _CPP_CFLOAT 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c/ciso646 b/libstdc++-v3/include/c/ciso646 new file mode 100644 index 0000000..c9f49fb --- /dev/null +++ b/libstdc++-v3/include/c/ciso646 @@ -0,0 +1,38 @@ +// -*- C++ -*- std header. + +// 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. + +/** @file ciso646 + * This is a Standard C++ Library file. You should @c #include this file + * in your programs, rather than any of the "st[dl]_*.h" implementation files. + * + * This is the C++ version of the Standard C Library header @c iso646.h, + * and its contents are (mostly) the same as that header, but are all + * contained in the namespace @c std. + */ + diff --git a/libstdc++-v3/include/c/climits b/libstdc++-v3/include/c/climits new file mode 100644 index 0000000..05795a6 --- /dev/null +++ b/libstdc++-v3/include/c/climits @@ -0,0 +1,42 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 2000 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: 18.2.2 Implementation properties: C library +// + +// Note: This is not a conforming implementation. + +#ifndef _CPP_CLIMITS +#define _CPP_CLIMITS 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c/clocale b/libstdc++-v3/include/c/clocale new file mode 100644 index 0000000..69ea1f6 --- /dev/null +++ b/libstdc++-v3/include/c/clocale @@ -0,0 +1,42 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 2000 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: 18.2.2 Implementation properties: C library +// + +// Note: This is not a conforming implementation. + +#ifndef _CPP_CLOCALE +#define _CPP_CLOCALE 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c/cmath b/libstdc++-v3/include/c/cmath new file mode 100644 index 0000000..2625eac --- /dev/null +++ b/libstdc++-v3/include/c/cmath @@ -0,0 +1,42 @@ +// -*- C++ -*- C math library. + +// Copyright (C) 2000 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.5 C library +// + +// Note: This is not a conforming implementation. + +#ifndef _CPP_CMATH +#define _CPP_CMATH 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c/csetjmp b/libstdc++-v3/include/c/csetjmp new file mode 100644 index 0000000..45e3da5 --- /dev/null +++ b/libstdc++-v3/include/c/csetjmp @@ -0,0 +1,42 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 2000 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: 20.4.6 C library +// + +// Note: This is not a conforming implementation. + +#ifndef _CPP_CSETJMP +#define _CPP_CSETJMP 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c/csignal b/libstdc++-v3/include/c/csignal new file mode 100644 index 0000000..da585dd --- /dev/null +++ b/libstdc++-v3/include/c/csignal @@ -0,0 +1,42 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 2000 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: 20.4.6 C library +// + +// Note: This is not a conforming implementation. + +#ifndef _CPP_CSIGNAL +#define _CPP_CSIGNAL 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c/cstdarg b/libstdc++-v3/include/c/cstdarg new file mode 100644 index 0000000..5d2a2d8 --- /dev/null +++ b/libstdc++-v3/include/c/cstdarg @@ -0,0 +1,42 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 2000 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: 20.4.6 C library +// + +// Note: This is not a conforming implementation. + +#ifndef _CPP_CSTDARG +#define _CPP_CSTDARG 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c/cstddef b/libstdc++-v3/include/c/cstddef new file mode 100644 index 0000000..456f6ca --- /dev/null +++ b/libstdc++-v3/include/c/cstddef @@ -0,0 +1,42 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 2000 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: 18.1 Types +// + +// Note: This is not a conforming implementation. + +#ifndef _CPP_CSTDDEF +#define _CPP_CSTDDEF 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c/cstdio b/libstdc++-v3/include/c/cstdio new file mode 100644 index 0000000..b7b2970 --- /dev/null +++ b/libstdc++-v3/include/c/cstdio @@ -0,0 +1,42 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 2000 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.2 C Library files +// + +// Note: This is not a conforming implementation. + +#ifndef _CPP_CSTDIO +#define _CPP_CSTDIO 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c/cstdlib b/libstdc++-v3/include/c/cstdlib new file mode 100644 index 0000000..75402e4 --- /dev/null +++ b/libstdc++-v3/include/c/cstdlib @@ -0,0 +1,42 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 2000 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: 20.4.6 C library +// + +// Note: This is not a conforming implementation. + +#ifndef _CPP_CSTDLIB +#define _CPP_CSTDLIB 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c/cstring b/libstdc++-v3/include/c/cstring new file mode 100644 index 0000000..6a17655 --- /dev/null +++ b/libstdc++-v3/include/c/cstring @@ -0,0 +1,42 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 2000 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: 20.4.6 C library +// + +// Note: This is not a conforming implementation. + +#ifndef _CPP_CSTRING +#define _CPP_CSTRING 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c/ctime b/libstdc++-v3/include/c/ctime new file mode 100644 index 0000000..bf53c50 --- /dev/null +++ b/libstdc++-v3/include/c/ctime @@ -0,0 +1,42 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 2000 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: 20.5 Date and time +// + +// Note: This is not a conforming implementation. + +#ifndef _CPP_CTIME +#define _CPP_CTIME 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c/cwchar b/libstdc++-v3/include/c/cwchar new file mode 100644 index 0000000..713f444 --- /dev/null +++ b/libstdc++-v3/include/c/cwchar @@ -0,0 +1,42 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 2000 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: ??? +// + +// Note: This is not a conforming implementation. + +#ifndef _CPP_CWCHAR +#define _CPP_CWCHAR 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c/cwctype b/libstdc++-v3/include/c/cwctype new file mode 100644 index 0000000..6f8a7c8 --- /dev/null +++ b/libstdc++-v3/include/c/cwctype @@ -0,0 +1,42 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 2000 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: +// + +// Note: This is not a conforming implementation. + +#ifndef _CPP_CWCTYPE +#define _CPP_CWCTYPE 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c_std/bits/cmath.tcc b/libstdc++-v3/include/c_std/bits/cmath.tcc deleted file mode 100644 index 9b86bbb..0000000 --- a/libstdc++-v3/include/c_std/bits/cmath.tcc +++ /dev/null @@ -1,54 +0,0 @@ -// -*- C++ -*- C math library. - -// Copyright (C) 2000 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. - -// This file was written by Gabriel Dos Reis - -#ifndef _CPP_BITS_CMATH_TCC -#define _CPP_BITS_CMATH_TCC 1 - -namespace std -{ - export template - _Tp - __cmath_power(_Tp __x, unsigned int __n) - { - _Tp __y = __n % 2 ? __x : 1; - - while (__n >>= 1) - { - __x = __x * __x; - if (__n % 2) - __y = __y * __x; - } - - return __y; - } -} - -#endif diff --git a/libstdc++-v3/include/c_std/bits/std_cassert.h b/libstdc++-v3/include/c_std/bits/std_cassert.h deleted file mode 100644 index b0e1f13..0000000 --- a/libstdc++-v3/include/c_std/bits/std_cassert.h +++ /dev/null @@ -1,47 +0,0 @@ -// -*- C++ -*- forwarding header. - -// 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: 19.2 Assertions -// - -// No include guards on this header... - -#pragma GCC system_header -#include - - - - - - - - - - diff --git a/libstdc++-v3/include/c_std/bits/std_cctype.h b/libstdc++-v3/include/c_std/bits/std_cctype.h deleted file mode 100644 index 189f4f5..0000000 --- a/libstdc++-v3/include/c_std/bits/std_cctype.h +++ /dev/null @@ -1,72 +0,0 @@ -// -*- C++ -*- forwarding header. - -// 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: -// - -#ifndef _CPP_CCTYPE -#define _CPP_CCTYPE 1 - -#pragma GCC system_header -#include - -// Get rid of those macros defined in in lieu of real functions. -#undef isalnum -#undef isalpha -#undef iscntrl -#undef isdigit -#undef isgraph -#undef islower -#undef isprint -#undef ispunct -#undef isspace -#undef isupper -#undef isxdigit -#undef tolower -#undef toupper - -namespace std -{ - using ::isalnum; - using ::isalpha; - using ::iscntrl; - using ::isdigit; - using ::isgraph; - using ::islower; - using ::isprint; - using ::ispunct; - using ::isspace; - using ::isupper; - using ::isxdigit; - using ::tolower; - using ::toupper; -} - -#endif diff --git a/libstdc++-v3/include/c_std/bits/std_cerrno.h b/libstdc++-v3/include/c_std/bits/std_cerrno.h deleted file mode 100644 index 7f1cdf6..0000000 --- a/libstdc++-v3/include/c_std/bits/std_cerrno.h +++ /dev/null @@ -1,45 +0,0 @@ -// The -*- C++ -*- error number header. - -// 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: 19.3 Error numbers -// - -#ifndef _CPP_CERRNO -#define _CPP_CERRNO 1 - -#pragma GCC system_header -#include - -// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 -#ifndef errno -#define errno errno -#endif - -#endif diff --git a/libstdc++-v3/include/c_std/bits/std_cfloat.h b/libstdc++-v3/include/c_std/bits/std_cfloat.h deleted file mode 100644 index 80f5ea5..0000000 --- a/libstdc++-v3/include/c_std/bits/std_cfloat.h +++ /dev/null @@ -1,40 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 1997, 1998, 1999, 2000 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: 18.2.2 Implementation properties: C library -// - -#ifndef _CPP_CFLOAT -#define _CPP_CFLOAT 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c_std/bits/std_climits.h b/libstdc++-v3/include/c_std/bits/std_climits.h deleted file mode 100644 index 48f6acf..0000000 --- a/libstdc++-v3/include/c_std/bits/std_climits.h +++ /dev/null @@ -1,40 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 1997, 1998, 1999, 2000 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: 18.2.2 Implementation properties: C library -// - -#ifndef _CPP_CLIMITS -#define _CPP_CLIMITS 1 - -#pragma GCC system_header -#include - -#endif diff --git a/libstdc++-v3/include/c_std/bits/std_clocale.h b/libstdc++-v3/include/c_std/bits/std_clocale.h deleted file mode 100644 index 02eb8fc..0000000 --- a/libstdc++-v3/include/c_std/bits/std_clocale.h +++ /dev/null @@ -1,51 +0,0 @@ -// -*- C++ -*- forwarding header. - -// 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: 18.2.2 Implementation properties: C library -// - -#ifndef _CPP_CLOCALE -#define _CPP_CLOCALE 1 - -#pragma GCC system_header -#include - -// Get rid of those macros defined in in lieu of real functions. -#undef setlocale -#undef localeconv - -namespace std -{ - using ::lconv; - using ::setlocale; - using ::localeconv; -} - -#endif diff --git a/libstdc++-v3/include/c_std/bits/std_cmath.h b/libstdc++-v3/include/c_std/bits/std_cmath.h deleted file mode 100644 index fedc5fb..0000000 --- a/libstdc++-v3/include/c_std/bits/std_cmath.h +++ /dev/null @@ -1,656 +0,0 @@ -// -*- C++ -*- C math library. - -// 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.5 C library -// - -#ifndef _CPP_CMATH -#define _CPP_CMATH 1 - -#include - -#pragma GCC system_header -#include - -// Get rid of those macros defined in in lieu of real functions. -#undef abs -#undef div -#undef acos -#undef asin -#undef atan -#undef atan2 -#undef ceil -#undef cos -#undef cosh -#undef exp -#undef fabs -#undef floor -#undef fmod -#undef frexp -#undef ldexp -#undef log -#undef log10 -#undef modf -#undef pow -#undef sin -#undef sinh -#undef sqrt -#undef tan -#undef tanh - -namespace std -{ - // Forward declaration of a helper function. This really should be - // an `exported' forward declaration. - template _Tp __cmath_power(_Tp, unsigned int); - - template - inline _Tp - __cmath_abs(_Tp __x) - { - return __x < _Tp() ? -__x : __x; - } - - inline float - abs(float __x) - { return __builtin_fabsf(__x); } - - inline double - abs(double __x) - { return __builtin_fabs(__x); } - - inline long double - abs(long double __x) - { return __builtin_fabsl(__x); } - -#if _GLIBCPP_HAVE_ACOSF - inline float - acos(float __x) { return ::acosf(__x); } -#else - inline float - acos(float __x) { return ::acos(static_cast(__x)); } -#endif - - using ::acos; - -#if _GLIBCPP_HAVE_ACOSL - inline long double - acos(long double __x) { return ::acosl(__x); } -#else - inline long double - acos(long double __x) { return ::acos(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_ASINF - inline float - asin(float __x) { return ::asinf(__x); } -#else - inline float - asin(float __x) { return ::asin(static_cast(__x)); } -#endif - - using ::asin; - -#if _GLIBCPP_HAVE_ASINL - inline long double - asin(long double __x) { return ::asinl(__x); } -#else - inline long double - asin(long double __x) { return ::asin(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_ATANF - inline float - atan(float __x) { return ::atanf(__x); } -#else - inline float - atan(float __x) { return ::atan(static_cast(__x)); } -#endif - - using ::atan; - -#if _GLIBCPP_HAVE_ATANL - inline long double - atan(long double __x) { return ::atanl(__x); } -#else - inline long double - atan(long double __x) { return ::atan(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_ATAN2F - inline float - atan2(float __y, float __x) { return ::atan2f(__y, __x); } -#else - inline float - atan2(float __y, float __x) - { return ::atan2(static_cast(__y), static_cast(__x)); } -#endif - - using ::atan2; - -#if _GLIBCPP_HAVE_ATAN2L - inline long double - atan2(long double __y, long double __x) { return ::atan2l(__y, __x); } -#else - inline long double - atan2(long double __y, long double __x) - { return ::atan2(static_cast(__y), static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_CEILF - inline float - ceil(float __x) { return ::ceilf(__x); } -#else - inline float - ceil(float __x) { return ::ceil(static_cast(__x)); } -#endif - - using ::ceil; - -#if _GLIBCPP_HAVE_CEILL - inline long double - ceil(long double __x) { return ::ceill(__x); } -#else - inline long double - ceil(long double __x) { return ::ceil(static_cast(__x)); } -#endif - - inline float - cos(float __x) - { return __builtin_cosf(__x); } - - using ::cos; - - inline long double - cos(long double __x) - { return __builtin_cosl(__x); } - -#if _GLIBCPP_HAVE_COSHF - inline float - cosh(float __x) { return ::coshf(__x); } -#else - inline float - cosh(float __x) { return ::cosh(static_cast(__x)); } -#endif - - using ::cosh; - -#if _GLIBCPP_HAVE_COSHL - inline long double - cosh(long double __x) { return ::coshl(__x); } -#else - inline long double - cosh(long double __x) { return ::cosh(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_EXPF - inline float - exp(float __x) { return ::expf(__x); } -#else - inline float - exp(float __x) { return ::exp(static_cast(__x)); } -#endif - - using ::exp; - -#if _GLIBCPP_HAVE_EXPL - inline long double - exp(long double __x) { return ::expl(__x); } -#else - inline long double - exp(long double __x) { return ::exp(static_cast(__x)); } -#endif - - inline float - fabs(float __x) - { return __builtin_fabsf(__x); } - - using ::fabs; - - inline long double - fabs(long double __x) - { return __builtin_fabsl(__x); } - -#if _GLIBCPP_HAVE_FLOORF - inline float - floor(float __x) { return ::floorf(__x); } -#else - inline float - floor(float __x) { return ::floor(static_cast(__x)); } -#endif - - using ::floor; - -#if _GLIBCPP_HAVE_FLOORL - inline long double - floor(long double __x) { return ::floorl(__x); } -#else - inline long double - floor(long double __x) { return ::floor(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_FMODF - inline float - fmod(float __x, float __y) { return ::fmodf(__x, __y); } -#else - inline float - fmod(float __x, float __y) - { return ::fmod(static_cast(__x), static_cast(__y)); } -#endif - - using ::fmod; - -#if _GLIBCPP_HAVE_FMODL - inline long double - fmod(long double __x, long double __y) { return ::fmodl(__x, __y); } -#else - inline long double - fmod(long double __x, long double __y) - { return ::fmod(static_cast(__x), static_cast(__y)); } -#endif - -#if _GLIBCPP_HAVE_FREXPF - inline float - frexp(float __x, int* __exp) { return ::frexpf(__x, __exp); } -#else - inline float - frexp(float __x, int* __exp) { return ::frexp(__x, __exp); } -#endif - - using ::frexp; - -#if _GLIBCPP_HAVE_FREXPL - inline long double - frexp(long double __x, int* __exp) { return ::frexpl(__x, __exp); } -#else - inline long double - frexp(long double __x, int* __exp) - { return ::frexp(static_cast(__x), __exp); } -#endif - -#if _GLIBCPP_HAVE_LDEXPF - inline float - ldexp(float __x, int __exp) { return ::ldexpf(__x, __exp); } -#else - inline float - ldexp(float __x, int __exp) - { return ::ldexp(static_cast(__x), __exp); } -#endif - - using ::ldexp; - -#if _GLIBCPP_HAVE_LDEXPL - inline long double - ldexp(long double __x, int __exp) { return ::ldexpl(__x, __exp); } -#else - inline long double - ldexp(long double __x, int __exp) - { return ::ldexp(static_cast(__x), __exp); } -#endif - -#if _GLIBCPP_HAVE_LOGF - inline float - log(float __x) { return ::logf(__x); } -#else - inline float log(float __x) - { return ::log(static_cast(__x)); } -#endif - - using ::log; - -#if _GLIBCPP_HAVE_LOGL - inline long double - log(long double __x) { return ::logl(__x); } -#else - inline long double - log(long double __x) { return ::log(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_LOG10F - inline float - log10(float __x) { return ::log10f(__x); } -#else - inline float - log10(float __x) { return ::log10(static_cast(__x)); } -#endif - - using ::log10; - -#if _GLIBCPP_HAVE_LOG10L - inline long double - log10(long double __x) { return ::log10l(__x); } -#else - inline long double - log10(long double __x) { return ::log10(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_MODFF - inline float - modf(float __x, float* __iptr) { return ::modff(__x, __iptr); } -#else - inline float - modf(float __x, float* __iptr) - { - double __tmp; - double __res = ::modf(static_cast(__x), &__tmp); - *__iptr = static_cast(__tmp); - return __res; - } -#endif - - using ::modf; - -#if _GLIBCPP_HAVE_MODFL - inline long double - modf(long double __x, long double* __iptr) { return ::modfl(__x, __iptr); } -#else - inline long double - modf(long double __x, long double* __iptr) - { - double __tmp; - double __res = ::modf(static_cast(__x), &__tmp); - * __iptr = static_cast(__tmp); - return __res; - } -#endif - - template - inline _Tp - __pow_helper(_Tp __x, int __n) - { - return __n < 0 - ? _Tp(1)/__cmath_power(__x, -__n) - : __cmath_power(__x, __n); - } - -#if _GLIBCPP_HAVE_POWF - inline float - pow(float __x, float __y) { return ::powf(__x, __y); } -#else - inline float - pow(float __x, float __y) - { return ::pow(static_cast(__x), static_cast(__y)); } -#endif - - using ::pow; - -#if _GLIBCPP_HAVE_POWL - inline long double - pow(long double __x, long double __y) { return ::powl(__x, __y); } -#else - inline long double - pow(long double __x, long double __y) - { return ::pow(static_cast(__x), static_cast(__y)); } -#endif - - inline float - pow(float __x, int __n) - { return __pow_helper(__x, __n); } - - inline double - pow(double __x, int __i) - { return __pow_helper(__x, __i); } - - inline long double - pow(long double __x, int __n) - { return __pow_helper(__x, __n); } - - inline float - sin(float __x) - { return __builtin_sinf(__x); } - - using ::sin; - - inline long double - sin(long double __x) - { return __builtin_sinl(__x); } - -#if _GLIBCPP_HAVE_SINHF - inline float - sinh(float __x) { return ::sinhf(__x); } -#else - inline float - sinh(float __x) { return ::sinh(static_cast(__x)); } -#endif - - using ::sinh; - -#if _GLIBCPP_HAVE_SINHL - inline long double - sinh(long double __x) { return ::sinhl(__x); } -#else - inline long double - sinh(long double __x) { return ::sinh(static_cast(__x)); } -#endif - - inline float - sqrt(float __x) - { return __builtin_sqrtf(__x); } - - using ::sqrt; - - inline long double - sqrt(long double __x) - { return __builtin_sqrtl(__x); } - -#if _GLIBCPP_HAVE_TANF - inline float - tan(float __x) { return ::tanf(__x); } -#else - inline float - tan(float __x) { return ::tan(static_cast(__x)); } -#endif - - using ::tan; - -#if _GLIBCPP_HAVE_TANL - inline long double - tan(long double __x) { return ::tanl(__x); } -#else - inline long double - tan(long double __x) { return ::tan(static_cast(__x)); } -#endif - -#if _GLIBCPP_HAVE_TANHF - inline float - tanh(float __x) { return ::tanhf(__x); } -#else - inline float - tanh(float __x) { return ::tanh(static_cast(__x)); } -#endif - - using ::tanh; - -#if _GLIBCPP_HAVE_TANHL - inline long double - tanh(long double __x) { return ::tanhl(__x); } -#else - inline long double - tanh(long double __x) { return ::tanh(static_cast(__x)); } -#endif -} - - -#if _GLIBCPP_USE_C99 -// These are possible macros imported from C99-land. For strict -// conformance, remove possible C99-injected names from the global -// namespace, and sequester them in the __gnu_cxx extension namespace. -namespace __gnu_cxx -{ - template - int - __capture_fpclassify(_Tp __f) { return fpclassify(__f); } - - template - int - __capture_isfinite(_Tp __f) { return isfinite(__f); } - - template - int - __capture_isinf(_Tp __f) { return isinf(__f); } - - template - int - __capture_isnan(_Tp __f) { return isnan(__f); } - - template - int - __capture_isnormal(_Tp __f) { return isnormal(__f); } - - template - int - __capture_signbit(_Tp __f) { return signbit(__f); } - - template - int - __capture_isgreater(_Tp __f1, _Tp __f2) - { return isgreater(__f1, __f2); } - - template - int - __capture_isgreaterequal(_Tp __f1, _Tp __f2) - { return isgreaterequal(__f1, __f2); } - - template - int - __capture_isless(_Tp __f1, _Tp __f2) { return isless(__f1, __f2); } - - template - int - __capture_islessequal(_Tp __f1, _Tp __f2) - { return islessequal(__f1, __f2); } - - template - int - __capture_islessgreater(_Tp __f1, _Tp __f2) - { return islessgreater(__f1, __f2); } - - template - int - __capture_isunordered(_Tp __f1, _Tp __f2) - { return isunordered(__f1, __f2); } -} -#endif - -#undef fpclassify -#undef isfinite -#undef isinf -#undef isnan -#undef isnormal -#undef signbit -#undef isgreater -#undef isgreaterequal -#undef isless -#undef islessequal -#undef islessgreater -#undef isunordered - -#if _GLIBCPP_USE_C99 -namespace __gnu_cxx -{ - template - int - fpclassify(_Tp __f) { return __capture_fpclassify(__f); } - - template - int - isfinite(_Tp __f) { return __capture_isfinite(__f); } - - template - int - isinf(_Tp __f) { return __capture_isinf(__f); } - - template - int - isnan(_Tp __f) { return __capture_isnan(__f); } - - template - int - isnormal(_Tp __f) { return __capture_isnormal(__f); } - - template - int - signbit(_Tp __f) { return __capture_signbit(__f); } - - template - int - isgreater(_Tp __f1, _Tp __f2) { return __capture_isgreater(__f1, __f2); } - - template - int - isgreaterequal(_Tp __f1, _Tp __f2) - { return __capture_isgreaterequal(__f1, __f2); } - - template - int - isless(_Tp __f1, _Tp __f2) { return __capture_isless(__f1, __f2); } - - template - int - islessequal(_Tp __f1, _Tp __f2) - { return __capture_islessequal(__f1, __f2); } - - template - int - islessgreater(_Tp __f1, _Tp __f2) - { return __capture_islessgreater(__f1, __f2); } - - template - int - isunordered(_Tp __f1, _Tp __f2) - { return __capture_isunordered(__f1, __f2); } -} - -namespace std -{ - using __gnu_cxx::fpclassify; - using __gnu_cxx::isfinite; - using __gnu_cxx::isinf; - using __gnu_cxx::isnan; - using __gnu_cxx::isnormal; - using __gnu_cxx::signbit; - using __gnu_cxx::isgreater; - using __gnu_cxx::isgreaterequal; - using __gnu_cxx::isless; - using __gnu_cxx::islessequal; - using __gnu_cxx::islessgreater; - using __gnu_cxx::isunordered; -} -#endif - -#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT -# define export -# include -#endif - -#endif - - - diff --git a/libstdc++-v3/include/c_std/bits/std_csetjmp.h b/libstdc++-v3/include/c_std/bits/std_csetjmp.h deleted file mode 100644 index 5db98e7..0000000 --- a/libstdc++-v3/include/c_std/bits/std_csetjmp.h +++ /dev/null @@ -1,54 +0,0 @@ -// -*- C++ -*- forwarding header. - -// 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: 20.4.6 C library -// - -#ifndef _CPP_CSETJMP -#define _CPP_CSETJMP 1 - -#pragma GCC system_header -#include - -// Get rid of those macros defined in in lieu of real functions. -#undef longjmp - -// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 -#ifndef setjmp -#define setjmp(env) setjmp (env) -#endif - -namespace std -{ - using ::jmp_buf; - using ::longjmp; -} - -#endif diff --git a/libstdc++-v3/include/c_std/bits/std_csignal.h b/libstdc++-v3/include/c_std/bits/std_csignal.h deleted file mode 100644 index 818e7bb..0000000 --- a/libstdc++-v3/include/c_std/bits/std_csignal.h +++ /dev/null @@ -1,50 +0,0 @@ -// -*- C++ -*- forwarding header. - -// 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: 20.4.6 C library -// - -#ifndef _CPP_CSIGNAL -#define _CPP_CSIGNAL 1 - -#pragma GCC system_header -#include - -// Get rid of those macros defined in in lieu of real functions. -#undef raise - -namespace std -{ - using ::sig_atomic_t; - using ::signal; - using ::raise; -} - -#endif diff --git a/libstdc++-v3/include/c_std/bits/std_cstdarg.h b/libstdc++-v3/include/c_std/bits/std_cstdarg.h deleted file mode 100644 index 58faa3b..0000000 --- a/libstdc++-v3/include/c_std/bits/std_cstdarg.h +++ /dev/null @@ -1,50 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 1997, 1998, 1999, 2000 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: 20.4.6 C library -// - -#ifndef _CPP_CSTDARG -#define _CPP_CSTDARG 1 - -#pragma GCC system_header -#include - -// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 -#ifndef va_end -#define va_end(ap) va_end (ap) -#endif - -namespace std -{ - using ::va_list; -} - -#endif diff --git a/libstdc++-v3/include/c_std/bits/std_cstddef.h b/libstdc++-v3/include/c_std/bits/std_cstddef.h deleted file mode 100644 index deb2db4..0000000 --- a/libstdc++-v3/include/c_std/bits/std_cstddef.h +++ /dev/null @@ -1,46 +0,0 @@ -// -*- C++ -*- forwarding header. - -// Copyright (C) 1997, 1998, 1999, 2000 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: 18.1 Types -// - -#ifndef _CPP_CSTDDEF -#define _CPP_CSTDDEF 1 - -#pragma GCC system_header -#include - -namespace std -{ - using ::ptrdiff_t; - using ::size_t; -} - -#endif diff --git a/libstdc++-v3/include/c_std/bits/std_cstdio.h b/libstdc++-v3/include/c_std/bits/std_cstdio.h deleted file mode 100644 index a4c67d2..0000000 --- a/libstdc++-v3/include/c_std/bits/std_cstdio.h +++ /dev/null @@ -1,161 +0,0 @@ -// -*- C++ -*- forwarding header. - -// 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.2 C Library files -// - -#ifndef _CPP_CSTDIO -#define _CPP_CSTDIO 1 - -#include -#include - -#pragma GCC system_header -#include - -// Get rid of those macros defined in in lieu of real functions. -#undef clearerr -#undef fclose -#undef feof -#undef ferror -#undef fflush -#undef fgetc -#undef fgetpos -#undef fgets -#undef fopen -#undef fprintf -#undef fputc -#undef fputs -#undef fread -#undef freopen -#undef fscanf -#undef fseek -#undef fsetpos -#undef ftell -#undef fwrite -#undef getc -#undef getchar -#undef gets -#undef perror -#undef printf -#undef putc -#undef putchar -#undef puts -#undef remove -#undef rename -#undef rewind -#undef scanf -#undef setbuf -#undef setvbuf -#undef sprintf -#undef sscanf -#undef tmpfile -#undef tmpnam -#undef ungetc -#undef vfprintf -#undef vprintf -#undef vsprintf - -namespace std -{ - using ::FILE; - using ::fpos_t; - - using ::clearerr; - using ::fclose; - using ::feof; - using ::ferror; - using ::fflush; - using ::fgetc; - using ::fgetpos; - using ::fgets; - using ::fopen; - using ::fprintf; - using ::fputc; - using ::fputs; - using ::fread; - using ::freopen; - using ::fscanf; - using ::fseek; - using ::fsetpos; - using ::ftell; - using ::fwrite; - using ::getc; - using ::getchar; - using ::gets; - using ::perror; - using ::printf; - using ::putc; - using ::putchar; - using ::puts; - using ::remove; - using ::rename; - using ::rewind; - using ::scanf; - using ::setbuf; - using ::setvbuf; - using ::sprintf; - using ::sscanf; - using ::tmpfile; - using ::tmpnam; - using ::ungetc; - using ::vfprintf; - using ::vprintf; - using ::vsprintf; -} - -#if _GLIBCPP_USE_C99 - -#undef snprintf -#undef vfscanf -#undef vscanf -#undef vsnprintf -#undef vsscanf - -namespace __gnu_cxx -{ - using ::snprintf; - using ::vfscanf; - using ::vscanf; - using ::vsnprintf; - using ::vsscanf; -} - -namespace std -{ - using __gnu_cxx::snprintf; - using __gnu_cxx::vfscanf; - using __gnu_cxx::vscanf; - using __gnu_cxx::vsnprintf; - using __gnu_cxx::vsscanf; -} -#endif - -#endif diff --git a/libstdc++-v3/include/c_std/bits/std_cstdlib.h b/libstdc++-v3/include/c_std/bits/std_cstdlib.h deleted file mode 100644 index b67ce44..0000000 --- a/libstdc++-v3/include/c_std/bits/std_cstdlib.h +++ /dev/null @@ -1,167 +0,0 @@ -// -*- C++ -*- forwarding header. - -// 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: 20.4.6 C library -// - -#ifndef _CPP_CSTDLIB -#define _CPP_CSTDLIB 1 - -#include -#include - -#pragma GCC system_header -#include - -// Get rid of those macros defined in in lieu of real functions. -#undef abort -#undef abs -#undef atexit -#undef atof -#undef atoi -#undef atol -#undef bsearch -#undef calloc -#undef div -#undef exit -#undef free -#undef getenv -#undef labs -#undef ldiv -#undef malloc -#undef mblen -#undef mbstowcs -#undef mbtowc -#undef qsort -#undef rand -#undef realloc -#undef srand -#undef strtod -#undef strtol -#undef strtoul -#undef system -#undef wcstombs -#undef wctomb - -namespace std -{ - using ::div_t; - using ::ldiv_t; - - using ::abort; - using ::abs; - using ::atexit; - using ::atof; - using ::atoi; - using ::atol; - using ::bsearch; - using ::calloc; - using ::div; - using ::exit; - using ::free; - using ::getenv; - using ::labs; - using ::ldiv; - using ::malloc; - using ::mblen; - using ::mbstowcs; - using ::mbtowc; - using ::qsort; - using ::rand; - using ::realloc; - using ::srand; - using ::strtod; - using ::strtol; - using ::strtoul; - using ::system; - using ::wcstombs; - using ::wctomb; - - inline long - abs(long __i) { return labs(__i); } - - inline ldiv_t - div(long __i, long __j) { return ldiv(__i, __j); } -} - -#if _GLIBCPP_USE_C99 - -#undef _Exit -#undef llabs -#undef lldiv -#undef atoll -#undef strtoll -#undef strtoull -#undef strtof -#undef strtold - -namespace __gnu_cxx -{ - using ::lldiv_t; - using ::_Exit; - - inline long long - abs(long long __x) { return __x >= 0 ? __x : -__x; } - - inline long long - llabs(long long __x) { return __x >= 0 ? __x : -__x; } - - inline lldiv_t - div(long long __n, long long __d) - { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } - - inline lldiv_t - lldiv(long long __n, long long __d) - { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } - - using ::atoll; - using ::strtof; - using ::strtoll; - using ::strtoull; - using ::strtold; -} - -namespace std -{ - using __gnu_cxx::lldiv_t; - using __gnu_cxx::_Exit; - using __gnu_cxx::abs; - using __gnu_cxx::llabs; - using __gnu_cxx::div; - using __gnu_cxx::lldiv; - using __gnu_cxx::atoll; - using __gnu_cxx::strtof; - using __gnu_cxx::strtoll; - using __gnu_cxx::strtoull; - using __gnu_cxx::strtold; -} -#endif - -#endif diff --git a/libstdc++-v3/include/c_std/bits/std_cstring.h b/libstdc++-v3/include/c_std/bits/std_cstring.h deleted file mode 100644 index ab6a6a6..0000000 --- a/libstdc++-v3/include/c_std/bits/std_cstring.h +++ /dev/null @@ -1,117 +0,0 @@ -// -*- C++ -*- forwarding header. - -// 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: 20.4.6 C library -// - -#ifndef _CPP_CSTRING -#define _CPP_CSTRING 1 - -#include - -#pragma GCC system_header -#include - -// Get rid of those macros defined in in lieu of real functions. -#undef memcpy -#undef memmove -#undef strcpy -#undef strncpy -#undef strcat -#undef strncat -#undef memcmp -#undef strcmp -#undef strcoll -#undef strncmp -#undef strxfrm -#undef memchr -#undef strchr -#undef strcspn -#undef strpbrk -#undef strrchr -#undef strspn -#undef strstr -#undef strtok -#undef memset -#undef strerror -#undef strlen - -namespace std -{ - using ::memcpy; - using ::memmove; - using ::strcpy; - using ::strncpy; - using ::strcat; - using ::strncat; - using ::memcmp; - using ::strcmp; - using ::strcoll; - using ::strncmp; - using ::strxfrm; - using ::strcspn; - using ::strspn; - using ::strtok; - using ::memset; - using ::strerror; - using ::strlen; - - using ::memchr; - - inline void* - memchr(void* __p, int __c, size_t __n) - { return memchr(const_cast(__p), __c, __n); } - - using ::strchr; - - inline char* - strchr(char* __s1, int __n) - { return __builtin_strchr(const_cast(__s1), __n); } - - using ::strpbrk; - - inline char* - strpbrk(char* __s1, const char* __s2) - { return __builtin_strpbrk(const_cast(__s1), __s2); } - - using ::strrchr; - - inline char* - strrchr(char* __s1, int __n) - { return __builtin_strrchr(const_cast(__s1), __n); } - - using ::strstr; - - inline char* - strstr(char* __s1, const char* __s2) - { return __builtin_strstr(const_cast(__s1), __s2); } -} - -#endif diff --git a/libstdc++-v3/include/c_std/bits/std_ctime.h b/libstdc++-v3/include/c_std/bits/std_ctime.h deleted file mode 100644 index a9051b4..0000000 --- a/libstdc++-v3/include/c_std/bits/std_ctime.h +++ /dev/null @@ -1,70 +0,0 @@ -// -*- C++ -*- forwarding header. - -// 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: 20.5 Date and time -// - -#ifndef _CPP_CTIME -#define _CPP_CTIME 1 - -#include - -#pragma GCC system_header -#include - -// Get rid of those macros defined in in lieu of real functions. -#undef clock -#undef difftime -#undef mktime -#undef time -#undef asctime -#undef ctime -#undef gmtime -#undef localtime -#undef strftime - -namespace std -{ - using ::clock_t; - using ::time_t; - using ::tm; - - using ::clock; - using ::difftime; - using ::mktime; - using ::time; - using ::asctime; - using ::ctime; - using ::gmtime; - using ::localtime; - using ::strftime; -} - -#endif diff --git a/libstdc++-v3/include/c_std/bits/std_cwchar.h b/libstdc++-v3/include/c_std/bits/std_cwchar.h deleted file mode 100644 index b19cfea..0000000 --- a/libstdc++-v3/include/c_std/bits/std_cwchar.h +++ /dev/null @@ -1,232 +0,0 @@ -// -*- C++ -*- forwarding header. - -// 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.4 -// - -#ifndef _CPP_CWCHAR -#define _CPP_CWCHAR 1 - -#include -#include -#include - -#if _GLIBCPP_HAVE_WCHAR_H -#pragma GCC system_header -#include -#endif - -// Need to do a bit of trickery here with mbstate_t as char_traits -// assumes it is in wchar.h, regardless of wchar_t specializations. -#ifndef _GLIBCPP_HAVE_MBSTATE_T -extern "C" -{ - typedef struct - { - int __fill[6]; - } mbstate_t; -} -#endif - -namespace std -{ - using ::mbstate_t; -} - -// Get rid of those macros defined in in lieu of real functions. -#undef btowc -#undef fgetwc -#undef fgetws -#undef fputwc -#undef fputws -#undef fwide -#undef fwprintf -#undef fwscanf -#undef getwc -#undef getwchar -#undef mbrlen -#undef mbrtowc -#undef mbsinit -#undef mbsrtowcs -#undef putwc -#undef putwchar -#undef swprintf -#undef swscanf -#undef ungetwc -#undef vfwprintf -#undef vfwscanf -#undef vswprintf -#undef vswscanf -#undef vwprintf -#undef vwscanf -#undef wcrtomb -#undef wcscat -#undef wcschr -#undef wcscmp -#undef wcscoll -#undef wcscpy -#undef wcscspn -#undef wcsftime -#undef wcslen -#undef wcsncat -#undef wcsncmp -#undef wcsncpy -#undef wcspbrk -#undef wcsrchr -#undef wcsrtombs -#undef wcsspn -#undef wcsstr -#undef wcstod -#undef wcstof -#undef wcstok -#undef wcstol -#undef wcstoul -#undef wcsxfrm -#undef wctob -#undef wmemchr -#undef wmemcmp -#undef wmemcpy -#undef wmemmove -#undef wmemset -#undef wprintf -#undef wscanf - -#if _GLIBCPP_USE_WCHAR_T -namespace std -{ - using ::wint_t; - - using ::btowc; - using ::fgetwc; - using ::fgetws; - using ::fputwc; - using ::fputws; - using ::fwide; - using ::fwprintf; - using ::fwscanf; - using ::getwc; - using ::getwchar; - using ::mbrlen; - using ::mbrtowc; - using ::mbsinit; - using ::mbsrtowcs; - using ::putwc; - using ::putwchar; - using ::swprintf; - using ::swscanf; - using ::ungetwc; - using ::vfwprintf; - using ::vfwscanf; - using ::vswprintf; - using ::vswscanf; - using ::vwprintf; - using ::vwscanf; - using ::wcrtomb; - using ::wcscat; - using ::wcscmp; - using ::wcscoll; - using ::wcscpy; - using ::wcscspn; - using ::wcsftime; - using ::wcslen; - using ::wcsncat; - using ::wcsncmp; - using ::wcsncpy; - using ::wcsrtombs; - using ::wcsspn; - using ::wcstod; - using ::wcstof; - using ::wcstok; - using ::wcstol; - using ::wcstoul; - using ::wcsxfrm; - using ::wctob; - using ::wmemcmp; - using ::wmemcpy; - using ::wmemmove; - using ::wmemset; - using ::wprintf; - using ::wscanf; - - using ::wcschr; - - inline wchar_t* - wcschr(wchar_t* __p, wchar_t __c) - { return wcschr(const_cast(__p), __c); } - - using ::wcspbrk; - - inline wchar_t* - wcspbrk(wchar_t* __s1, wchar_t* __s2) - { return wcspbrk(const_cast(__s1), __s2); } - - using ::wcsrchr; - - inline wchar_t* - wcsrchr(wchar_t* __p, wchar_t __c) - { return wcsrchr(const_cast(__p), __c); } - - using ::wcsstr; - - inline wchar_t* - wcsstr(wchar_t* __s1, wchar_t* __s2) - { return wcsstr(const_cast(__s1), __s2); } - - using ::wmemchr; - - inline wchar_t* - wmemchr(wchar_t* __p, wchar_t __c, size_t __n) - { return wmemchr(const_cast(__p), __c, __n); } -} - -#if _GLIBCPP_USE_C99 - -#undef wcstold -#undef wcstoll -#undef wcstoull - -namespace __gnu_cxx -{ - using ::wcstold; - using ::wcstoll; - using ::wcstoull; -} - -namespace std -{ - using __gnu_cxx::wcstold; - using __gnu_cxx::wcstoll; - using __gnu_cxx::wcstoull; -} -#endif - -#endif //_GLIBCPP_USE_WCHAR_T - -#endif diff --git a/libstdc++-v3/include/c_std/bits/std_cwctype.h b/libstdc++-v3/include/c_std/bits/std_cwctype.h deleted file mode 100644 index 39ae076..0000000 --- a/libstdc++-v3/include/c_std/bits/std_cwctype.h +++ /dev/null @@ -1,89 +0,0 @@ -// -*- C++ -*- forwarding header. - -// 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: -// - -#ifndef _CPP_CWCTYPE -#define _CPP_CWCTYPE 1 - -#pragma GCC system_header -#include - -// Get rid of those macros defined in in lieu of real functions. -#undef iswalnum -#undef iswalpha -#undef iswblank -#undef iswcntrl -#undef iswdigit -#undef iswgraph -#undef iswlower -#undef iswprint -#undef iswprint -#undef iswpunct -#undef iswspace -#undef iswupper -#undef iswxdigit -#undef iswctype -#undef towlower -#undef towupper -#undef towctrans -#undef wctrans -#undef wctype - -namespace std -{ - using ::wint_t; // cwchar - - using ::wctype_t; - using ::wctrans_t; - - using ::iswalnum; - using ::iswalpha; - using ::iswblank; - using ::iswcntrl; - using ::iswdigit; - using ::iswgraph; - using ::iswlower; - using ::iswprint; - using ::iswprint; - using ::iswpunct; - using ::iswspace; - using ::iswupper; - using ::iswxdigit; - using ::iswctype; - using ::towlower; - using ::towupper; - using ::towctrans; - using ::wctrans; - using ::wctype; -} - -#endif diff --git a/libstdc++-v3/include/c_std/cassert b/libstdc++-v3/include/c_std/cassert new file mode 100644 index 0000000..b0e1f13 --- /dev/null +++ b/libstdc++-v3/include/c_std/cassert @@ -0,0 +1,47 @@ +// -*- C++ -*- forwarding header. + +// 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: 19.2 Assertions +// + +// No include guards on this header... + +#pragma GCC system_header +#include + + + + + + + + + + diff --git a/libstdc++-v3/include/c_std/cctype b/libstdc++-v3/include/c_std/cctype new file mode 100644 index 0000000..189f4f5 --- /dev/null +++ b/libstdc++-v3/include/c_std/cctype @@ -0,0 +1,72 @@ +// -*- C++ -*- forwarding header. + +// 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: +// + +#ifndef _CPP_CCTYPE +#define _CPP_CCTYPE 1 + +#pragma GCC system_header +#include + +// Get rid of those macros defined in in lieu of real functions. +#undef isalnum +#undef isalpha +#undef iscntrl +#undef isdigit +#undef isgraph +#undef islower +#undef isprint +#undef ispunct +#undef isspace +#undef isupper +#undef isxdigit +#undef tolower +#undef toupper + +namespace std +{ + using ::isalnum; + using ::isalpha; + using ::iscntrl; + using ::isdigit; + using ::isgraph; + using ::islower; + using ::isprint; + using ::ispunct; + using ::isspace; + using ::isupper; + using ::isxdigit; + using ::tolower; + using ::toupper; +} + +#endif diff --git a/libstdc++-v3/include/c_std/cerrno b/libstdc++-v3/include/c_std/cerrno new file mode 100644 index 0000000..7f1cdf6 --- /dev/null +++ b/libstdc++-v3/include/c_std/cerrno @@ -0,0 +1,45 @@ +// The -*- C++ -*- error number header. + +// 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: 19.3 Error numbers +// + +#ifndef _CPP_CERRNO +#define _CPP_CERRNO 1 + +#pragma GCC system_header +#include + +// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 +#ifndef errno +#define errno errno +#endif + +#endif diff --git a/libstdc++-v3/include/c_std/cfloat b/libstdc++-v3/include/c_std/cfloat new file mode 100644 index 0000000..80f5ea5 --- /dev/null +++ b/libstdc++-v3/include/c_std/cfloat @@ -0,0 +1,40 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000 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: 18.2.2 Implementation properties: C library +// + +#ifndef _CPP_CFLOAT +#define _CPP_CFLOAT 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c_std/ciso646 b/libstdc++-v3/include/c_std/ciso646 new file mode 100644 index 0000000..c9f49fb --- /dev/null +++ b/libstdc++-v3/include/c_std/ciso646 @@ -0,0 +1,38 @@ +// -*- C++ -*- std header. + +// 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. + +/** @file ciso646 + * This is a Standard C++ Library file. You should @c #include this file + * in your programs, rather than any of the "st[dl]_*.h" implementation files. + * + * This is the C++ version of the Standard C Library header @c iso646.h, + * and its contents are (mostly) the same as that header, but are all + * contained in the namespace @c std. + */ + diff --git a/libstdc++-v3/include/c_std/climits b/libstdc++-v3/include/c_std/climits new file mode 100644 index 0000000..48f6acf --- /dev/null +++ b/libstdc++-v3/include/c_std/climits @@ -0,0 +1,40 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000 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: 18.2.2 Implementation properties: C library +// + +#ifndef _CPP_CLIMITS +#define _CPP_CLIMITS 1 + +#pragma GCC system_header +#include + +#endif diff --git a/libstdc++-v3/include/c_std/clocale b/libstdc++-v3/include/c_std/clocale new file mode 100644 index 0000000..02eb8fc --- /dev/null +++ b/libstdc++-v3/include/c_std/clocale @@ -0,0 +1,51 @@ +// -*- C++ -*- forwarding header. + +// 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: 18.2.2 Implementation properties: C library +// + +#ifndef _CPP_CLOCALE +#define _CPP_CLOCALE 1 + +#pragma GCC system_header +#include + +// Get rid of those macros defined in in lieu of real functions. +#undef setlocale +#undef localeconv + +namespace std +{ + using ::lconv; + using ::setlocale; + using ::localeconv; +} + +#endif diff --git a/libstdc++-v3/include/c_std/cmath b/libstdc++-v3/include/c_std/cmath new file mode 100644 index 0000000..79644ce --- /dev/null +++ b/libstdc++-v3/include/c_std/cmath @@ -0,0 +1,656 @@ +// -*- C++ -*- C math library. + +// 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.5 C library +// + +#ifndef _CPP_CMATH +#define _CPP_CMATH 1 + +#include + +#pragma GCC system_header +#include + +// Get rid of those macros defined in in lieu of real functions. +#undef abs +#undef div +#undef acos +#undef asin +#undef atan +#undef atan2 +#undef ceil +#undef cos +#undef cosh +#undef exp +#undef fabs +#undef floor +#undef fmod +#undef frexp +#undef ldexp +#undef log +#undef log10 +#undef modf +#undef pow +#undef sin +#undef sinh +#undef sqrt +#undef tan +#undef tanh + +namespace std +{ + // Forward declaration of a helper function. This really should be + // an `exported' forward declaration. + template _Tp __cmath_power(_Tp, unsigned int); + + template + inline _Tp + __cmath_abs(_Tp __x) + { + return __x < _Tp() ? -__x : __x; + } + + inline float + abs(float __x) + { return __builtin_fabsf(__x); } + + inline double + abs(double __x) + { return __builtin_fabs(__x); } + + inline long double + abs(long double __x) + { return __builtin_fabsl(__x); } + +#if _GLIBCPP_HAVE_ACOSF + inline float + acos(float __x) { return ::acosf(__x); } +#else + inline float + acos(float __x) { return ::acos(static_cast(__x)); } +#endif + + using ::acos; + +#if _GLIBCPP_HAVE_ACOSL + inline long double + acos(long double __x) { return ::acosl(__x); } +#else + inline long double + acos(long double __x) { return ::acos(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_ASINF + inline float + asin(float __x) { return ::asinf(__x); } +#else + inline float + asin(float __x) { return ::asin(static_cast(__x)); } +#endif + + using ::asin; + +#if _GLIBCPP_HAVE_ASINL + inline long double + asin(long double __x) { return ::asinl(__x); } +#else + inline long double + asin(long double __x) { return ::asin(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_ATANF + inline float + atan(float __x) { return ::atanf(__x); } +#else + inline float + atan(float __x) { return ::atan(static_cast(__x)); } +#endif + + using ::atan; + +#if _GLIBCPP_HAVE_ATANL + inline long double + atan(long double __x) { return ::atanl(__x); } +#else + inline long double + atan(long double __x) { return ::atan(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_ATAN2F + inline float + atan2(float __y, float __x) { return ::atan2f(__y, __x); } +#else + inline float + atan2(float __y, float __x) + { return ::atan2(static_cast(__y), static_cast(__x)); } +#endif + + using ::atan2; + +#if _GLIBCPP_HAVE_ATAN2L + inline long double + atan2(long double __y, long double __x) { return ::atan2l(__y, __x); } +#else + inline long double + atan2(long double __y, long double __x) + { return ::atan2(static_cast(__y), static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_CEILF + inline float + ceil(float __x) { return ::ceilf(__x); } +#else + inline float + ceil(float __x) { return ::ceil(static_cast(__x)); } +#endif + + using ::ceil; + +#if _GLIBCPP_HAVE_CEILL + inline long double + ceil(long double __x) { return ::ceill(__x); } +#else + inline long double + ceil(long double __x) { return ::ceil(static_cast(__x)); } +#endif + + inline float + cos(float __x) + { return __builtin_cosf(__x); } + + using ::cos; + + inline long double + cos(long double __x) + { return __builtin_cosl(__x); } + +#if _GLIBCPP_HAVE_COSHF + inline float + cosh(float __x) { return ::coshf(__x); } +#else + inline float + cosh(float __x) { return ::cosh(static_cast(__x)); } +#endif + + using ::cosh; + +#if _GLIBCPP_HAVE_COSHL + inline long double + cosh(long double __x) { return ::coshl(__x); } +#else + inline long double + cosh(long double __x) { return ::cosh(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_EXPF + inline float + exp(float __x) { return ::expf(__x); } +#else + inline float + exp(float __x) { return ::exp(static_cast(__x)); } +#endif + + using ::exp; + +#if _GLIBCPP_HAVE_EXPL + inline long double + exp(long double __x) { return ::expl(__x); } +#else + inline long double + exp(long double __x) { return ::exp(static_cast(__x)); } +#endif + + inline float + fabs(float __x) + { return __builtin_fabsf(__x); } + + using ::fabs; + + inline long double + fabs(long double __x) + { return __builtin_fabsl(__x); } + +#if _GLIBCPP_HAVE_FLOORF + inline float + floor(float __x) { return ::floorf(__x); } +#else + inline float + floor(float __x) { return ::floor(static_cast(__x)); } +#endif + + using ::floor; + +#if _GLIBCPP_HAVE_FLOORL + inline long double + floor(long double __x) { return ::floorl(__x); } +#else + inline long double + floor(long double __x) { return ::floor(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_FMODF + inline float + fmod(float __x, float __y) { return ::fmodf(__x, __y); } +#else + inline float + fmod(float __x, float __y) + { return ::fmod(static_cast(__x), static_cast(__y)); } +#endif + + using ::fmod; + +#if _GLIBCPP_HAVE_FMODL + inline long double + fmod(long double __x, long double __y) { return ::fmodl(__x, __y); } +#else + inline long double + fmod(long double __x, long double __y) + { return ::fmod(static_cast(__x), static_cast(__y)); } +#endif + +#if _GLIBCPP_HAVE_FREXPF + inline float + frexp(float __x, int* __exp) { return ::frexpf(__x, __exp); } +#else + inline float + frexp(float __x, int* __exp) { return ::frexp(__x, __exp); } +#endif + + using ::frexp; + +#if _GLIBCPP_HAVE_FREXPL + inline long double + frexp(long double __x, int* __exp) { return ::frexpl(__x, __exp); } +#else + inline long double + frexp(long double __x, int* __exp) + { return ::frexp(static_cast(__x), __exp); } +#endif + +#if _GLIBCPP_HAVE_LDEXPF + inline float + ldexp(float __x, int __exp) { return ::ldexpf(__x, __exp); } +#else + inline float + ldexp(float __x, int __exp) + { return ::ldexp(static_cast(__x), __exp); } +#endif + + using ::ldexp; + +#if _GLIBCPP_HAVE_LDEXPL + inline long double + ldexp(long double __x, int __exp) { return ::ldexpl(__x, __exp); } +#else + inline long double + ldexp(long double __x, int __exp) + { return ::ldexp(static_cast(__x), __exp); } +#endif + +#if _GLIBCPP_HAVE_LOGF + inline float + log(float __x) { return ::logf(__x); } +#else + inline float log(float __x) + { return ::log(static_cast(__x)); } +#endif + + using ::log; + +#if _GLIBCPP_HAVE_LOGL + inline long double + log(long double __x) { return ::logl(__x); } +#else + inline long double + log(long double __x) { return ::log(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_LOG10F + inline float + log10(float __x) { return ::log10f(__x); } +#else + inline float + log10(float __x) { return ::log10(static_cast(__x)); } +#endif + + using ::log10; + +#if _GLIBCPP_HAVE_LOG10L + inline long double + log10(long double __x) { return ::log10l(__x); } +#else + inline long double + log10(long double __x) { return ::log10(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_MODFF + inline float + modf(float __x, float* __iptr) { return ::modff(__x, __iptr); } +#else + inline float + modf(float __x, float* __iptr) + { + double __tmp; + double __res = ::modf(static_cast(__x), &__tmp); + *__iptr = static_cast(__tmp); + return __res; + } +#endif + + using ::modf; + +#if _GLIBCPP_HAVE_MODFL + inline long double + modf(long double __x, long double* __iptr) { return ::modfl(__x, __iptr); } +#else + inline long double + modf(long double __x, long double* __iptr) + { + double __tmp; + double __res = ::modf(static_cast(__x), &__tmp); + * __iptr = static_cast(__tmp); + return __res; + } +#endif + + template + inline _Tp + __pow_helper(_Tp __x, int __n) + { + return __n < 0 + ? _Tp(1)/__cmath_power(__x, -__n) + : __cmath_power(__x, __n); + } + +#if _GLIBCPP_HAVE_POWF + inline float + pow(float __x, float __y) { return ::powf(__x, __y); } +#else + inline float + pow(float __x, float __y) + { return ::pow(static_cast(__x), static_cast(__y)); } +#endif + + using ::pow; + +#if _GLIBCPP_HAVE_POWL + inline long double + pow(long double __x, long double __y) { return ::powl(__x, __y); } +#else + inline long double + pow(long double __x, long double __y) + { return ::pow(static_cast(__x), static_cast(__y)); } +#endif + + inline float + pow(float __x, int __n) + { return __pow_helper(__x, __n); } + + inline double + pow(double __x, int __i) + { return __pow_helper(__x, __i); } + + inline long double + pow(long double __x, int __n) + { return __pow_helper(__x, __n); } + + inline float + sin(float __x) + { return __builtin_sinf(__x); } + + using ::sin; + + inline long double + sin(long double __x) + { return __builtin_sinl(__x); } + +#if _GLIBCPP_HAVE_SINHF + inline float + sinh(float __x) { return ::sinhf(__x); } +#else + inline float + sinh(float __x) { return ::sinh(static_cast(__x)); } +#endif + + using ::sinh; + +#if _GLIBCPP_HAVE_SINHL + inline long double + sinh(long double __x) { return ::sinhl(__x); } +#else + inline long double + sinh(long double __x) { return ::sinh(static_cast(__x)); } +#endif + + inline float + sqrt(float __x) + { return __builtin_sqrtf(__x); } + + using ::sqrt; + + inline long double + sqrt(long double __x) + { return __builtin_sqrtl(__x); } + +#if _GLIBCPP_HAVE_TANF + inline float + tan(float __x) { return ::tanf(__x); } +#else + inline float + tan(float __x) { return ::tan(static_cast(__x)); } +#endif + + using ::tan; + +#if _GLIBCPP_HAVE_TANL + inline long double + tan(long double __x) { return ::tanl(__x); } +#else + inline long double + tan(long double __x) { return ::tan(static_cast(__x)); } +#endif + +#if _GLIBCPP_HAVE_TANHF + inline float + tanh(float __x) { return ::tanhf(__x); } +#else + inline float + tanh(float __x) { return ::tanh(static_cast(__x)); } +#endif + + using ::tanh; + +#if _GLIBCPP_HAVE_TANHL + inline long double + tanh(long double __x) { return ::tanhl(__x); } +#else + inline long double + tanh(long double __x) { return ::tanh(static_cast(__x)); } +#endif +} + + +#if _GLIBCPP_USE_C99 +// These are possible macros imported from C99-land. For strict +// conformance, remove possible C99-injected names from the global +// namespace, and sequester them in the __gnu_cxx extension namespace. +namespace __gnu_cxx +{ + template + int + __capture_fpclassify(_Tp __f) { return fpclassify(__f); } + + template + int + __capture_isfinite(_Tp __f) { return isfinite(__f); } + + template + int + __capture_isinf(_Tp __f) { return isinf(__f); } + + template + int + __capture_isnan(_Tp __f) { return isnan(__f); } + + template + int + __capture_isnormal(_Tp __f) { return isnormal(__f); } + + template + int + __capture_signbit(_Tp __f) { return signbit(__f); } + + template + int + __capture_isgreater(_Tp __f1, _Tp __f2) + { return isgreater(__f1, __f2); } + + template + int + __capture_isgreaterequal(_Tp __f1, _Tp __f2) + { return isgreaterequal(__f1, __f2); } + + template + int + __capture_isless(_Tp __f1, _Tp __f2) { return isless(__f1, __f2); } + + template + int + __capture_islessequal(_Tp __f1, _Tp __f2) + { return islessequal(__f1, __f2); } + + template + int + __capture_islessgreater(_Tp __f1, _Tp __f2) + { return islessgreater(__f1, __f2); } + + template + int + __capture_isunordered(_Tp __f1, _Tp __f2) + { return isunordered(__f1, __f2); } +} +#endif + +#undef fpclassify +#undef isfinite +#undef isinf +#undef isnan +#undef isnormal +#undef signbit +#undef isgreater +#undef isgreaterequal +#undef isless +#undef islessequal +#undef islessgreater +#undef isunordered + +#if _GLIBCPP_USE_C99 +namespace __gnu_cxx +{ + template + int + fpclassify(_Tp __f) { return __capture_fpclassify(__f); } + + template + int + isfinite(_Tp __f) { return __capture_isfinite(__f); } + + template + int + isinf(_Tp __f) { return __capture_isinf(__f); } + + template + int + isnan(_Tp __f) { return __capture_isnan(__f); } + + template + int + isnormal(_Tp __f) { return __capture_isnormal(__f); } + + template + int + signbit(_Tp __f) { return __capture_signbit(__f); } + + template + int + isgreater(_Tp __f1, _Tp __f2) { return __capture_isgreater(__f1, __f2); } + + template + int + isgreaterequal(_Tp __f1, _Tp __f2) + { return __capture_isgreaterequal(__f1, __f2); } + + template + int + isless(_Tp __f1, _Tp __f2) { return __capture_isless(__f1, __f2); } + + template + int + islessequal(_Tp __f1, _Tp __f2) + { return __capture_islessequal(__f1, __f2); } + + template + int + islessgreater(_Tp __f1, _Tp __f2) + { return __capture_islessgreater(__f1, __f2); } + + template + int + isunordered(_Tp __f1, _Tp __f2) + { return __capture_isunordered(__f1, __f2); } +} + +namespace std +{ + using __gnu_cxx::fpclassify; + using __gnu_cxx::isfinite; + using __gnu_cxx::isinf; + using __gnu_cxx::isnan; + using __gnu_cxx::isnormal; + using __gnu_cxx::signbit; + using __gnu_cxx::isgreater; + using __gnu_cxx::isgreaterequal; + using __gnu_cxx::isless; + using __gnu_cxx::islessequal; + using __gnu_cxx::islessgreater; + using __gnu_cxx::isunordered; +} +#endif + +#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT +# define export +# include +#endif + +#endif + + + diff --git a/libstdc++-v3/include/c_std/cmath.tcc b/libstdc++-v3/include/c_std/cmath.tcc new file mode 100644 index 0000000..9b86bbb --- /dev/null +++ b/libstdc++-v3/include/c_std/cmath.tcc @@ -0,0 +1,54 @@ +// -*- C++ -*- C math library. + +// Copyright (C) 2000 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. + +// This file was written by Gabriel Dos Reis + +#ifndef _CPP_BITS_CMATH_TCC +#define _CPP_BITS_CMATH_TCC 1 + +namespace std +{ + export template + _Tp + __cmath_power(_Tp __x, unsigned int __n) + { + _Tp __y = __n % 2 ? __x : 1; + + while (__n >>= 1) + { + __x = __x * __x; + if (__n % 2) + __y = __y * __x; + } + + return __y; + } +} + +#endif diff --git a/libstdc++-v3/include/c_std/csetjmp b/libstdc++-v3/include/c_std/csetjmp new file mode 100644 index 0000000..5db98e7 --- /dev/null +++ b/libstdc++-v3/include/c_std/csetjmp @@ -0,0 +1,54 @@ +// -*- C++ -*- forwarding header. + +// 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: 20.4.6 C library +// + +#ifndef _CPP_CSETJMP +#define _CPP_CSETJMP 1 + +#pragma GCC system_header +#include + +// Get rid of those macros defined in in lieu of real functions. +#undef longjmp + +// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 +#ifndef setjmp +#define setjmp(env) setjmp (env) +#endif + +namespace std +{ + using ::jmp_buf; + using ::longjmp; +} + +#endif diff --git a/libstdc++-v3/include/c_std/csignal b/libstdc++-v3/include/c_std/csignal new file mode 100644 index 0000000..818e7bb --- /dev/null +++ b/libstdc++-v3/include/c_std/csignal @@ -0,0 +1,50 @@ +// -*- C++ -*- forwarding header. + +// 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: 20.4.6 C library +// + +#ifndef _CPP_CSIGNAL +#define _CPP_CSIGNAL 1 + +#pragma GCC system_header +#include + +// Get rid of those macros defined in in lieu of real functions. +#undef raise + +namespace std +{ + using ::sig_atomic_t; + using ::signal; + using ::raise; +} + +#endif diff --git a/libstdc++-v3/include/c_std/cstdarg b/libstdc++-v3/include/c_std/cstdarg new file mode 100644 index 0000000..58faa3b --- /dev/null +++ b/libstdc++-v3/include/c_std/cstdarg @@ -0,0 +1,50 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000 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: 20.4.6 C library +// + +#ifndef _CPP_CSTDARG +#define _CPP_CSTDARG 1 + +#pragma GCC system_header +#include + +// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 +#ifndef va_end +#define va_end(ap) va_end (ap) +#endif + +namespace std +{ + using ::va_list; +} + +#endif diff --git a/libstdc++-v3/include/c_std/cstddef b/libstdc++-v3/include/c_std/cstddef new file mode 100644 index 0000000..deb2db4 --- /dev/null +++ b/libstdc++-v3/include/c_std/cstddef @@ -0,0 +1,46 @@ +// -*- C++ -*- forwarding header. + +// Copyright (C) 1997, 1998, 1999, 2000 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: 18.1 Types +// + +#ifndef _CPP_CSTDDEF +#define _CPP_CSTDDEF 1 + +#pragma GCC system_header +#include + +namespace std +{ + using ::ptrdiff_t; + using ::size_t; +} + +#endif diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio new file mode 100644 index 0000000..a6c78d2 --- /dev/null +++ b/libstdc++-v3/include/c_std/cstdio @@ -0,0 +1,161 @@ +// -*- C++ -*- forwarding header. + +// 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.2 C Library files +// + +#ifndef _CPP_CSTDIO +#define _CPP_CSTDIO 1 + +#include +#include + +#pragma GCC system_header +#include + +// Get rid of those macros defined in in lieu of real functions. +#undef clearerr +#undef fclose +#undef feof +#undef ferror +#undef fflush +#undef fgetc +#undef fgetpos +#undef fgets +#undef fopen +#undef fprintf +#undef fputc +#undef fputs +#undef fread +#undef freopen +#undef fscanf +#undef fseek +#undef fsetpos +#undef ftell +#undef fwrite +#undef getc +#undef getchar +#undef gets +#undef perror +#undef printf +#undef putc +#undef putchar +#undef puts +#undef remove +#undef rename +#undef rewind +#undef scanf +#undef setbuf +#undef setvbuf +#undef sprintf +#undef sscanf +#undef tmpfile +#undef tmpnam +#undef ungetc +#undef vfprintf +#undef vprintf +#undef vsprintf + +namespace std +{ + using ::FILE; + using ::fpos_t; + + using ::clearerr; + using ::fclose; + using ::feof; + using ::ferror; + using ::fflush; + using ::fgetc; + using ::fgetpos; + using ::fgets; + using ::fopen; + using ::fprintf; + using ::fputc; + using ::fputs; + using ::fread; + using ::freopen; + using ::fscanf; + using ::fseek; + using ::fsetpos; + using ::ftell; + using ::fwrite; + using ::getc; + using ::getchar; + using ::gets; + using ::perror; + using ::printf; + using ::putc; + using ::putchar; + using ::puts; + using ::remove; + using ::rename; + using ::rewind; + using ::scanf; + using ::setbuf; + using ::setvbuf; + using ::sprintf; + using ::sscanf; + using ::tmpfile; + using ::tmpnam; + using ::ungetc; + using ::vfprintf; + using ::vprintf; + using ::vsprintf; +} + +#if _GLIBCPP_USE_C99 + +#undef snprintf +#undef vfscanf +#undef vscanf +#undef vsnprintf +#undef vsscanf + +namespace __gnu_cxx +{ + using ::snprintf; + using ::vfscanf; + using ::vscanf; + using ::vsnprintf; + using ::vsscanf; +} + +namespace std +{ + using __gnu_cxx::snprintf; + using __gnu_cxx::vfscanf; + using __gnu_cxx::vscanf; + using __gnu_cxx::vsnprintf; + using __gnu_cxx::vsscanf; +} +#endif + +#endif diff --git a/libstdc++-v3/include/c_std/cstdlib b/libstdc++-v3/include/c_std/cstdlib new file mode 100644 index 0000000..73176db --- /dev/null +++ b/libstdc++-v3/include/c_std/cstdlib @@ -0,0 +1,167 @@ +// -*- C++ -*- forwarding header. + +// 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: 20.4.6 C library +// + +#ifndef _CPP_CSTDLIB +#define _CPP_CSTDLIB 1 + +#include +#include + +#pragma GCC system_header +#include + +// Get rid of those macros defined in in lieu of real functions. +#undef abort +#undef abs +#undef atexit +#undef atof +#undef atoi +#undef atol +#undef bsearch +#undef calloc +#undef div +#undef exit +#undef free +#undef getenv +#undef labs +#undef ldiv +#undef malloc +#undef mblen +#undef mbstowcs +#undef mbtowc +#undef qsort +#undef rand +#undef realloc +#undef srand +#undef strtod +#undef strtol +#undef strtoul +#undef system +#undef wcstombs +#undef wctomb + +namespace std +{ + using ::div_t; + using ::ldiv_t; + + using ::abort; + using ::abs; + using ::atexit; + using ::atof; + using ::atoi; + using ::atol; + using ::bsearch; + using ::calloc; + using ::div; + using ::exit; + using ::free; + using ::getenv; + using ::labs; + using ::ldiv; + using ::malloc; + using ::mblen; + using ::mbstowcs; + using ::mbtowc; + using ::qsort; + using ::rand; + using ::realloc; + using ::srand; + using ::strtod; + using ::strtol; + using ::strtoul; + using ::system; + using ::wcstombs; + using ::wctomb; + + inline long + abs(long __i) { return labs(__i); } + + inline ldiv_t + div(long __i, long __j) { return ldiv(__i, __j); } +} + +#if _GLIBCPP_USE_C99 + +#undef _Exit +#undef llabs +#undef lldiv +#undef atoll +#undef strtoll +#undef strtoull +#undef strtof +#undef strtold + +namespace __gnu_cxx +{ + using ::lldiv_t; + using ::_Exit; + + inline long long + abs(long long __x) { return __x >= 0 ? __x : -__x; } + + inline long long + llabs(long long __x) { return __x >= 0 ? __x : -__x; } + + inline lldiv_t + div(long long __n, long long __d) + { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } + + inline lldiv_t + lldiv(long long __n, long long __d) + { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } + + using ::atoll; + using ::strtof; + using ::strtoll; + using ::strtoull; + using ::strtold; +} + +namespace std +{ + using __gnu_cxx::lldiv_t; + using __gnu_cxx::_Exit; + using __gnu_cxx::abs; + using __gnu_cxx::llabs; + using __gnu_cxx::div; + using __gnu_cxx::lldiv; + using __gnu_cxx::atoll; + using __gnu_cxx::strtof; + using __gnu_cxx::strtoll; + using __gnu_cxx::strtoull; + using __gnu_cxx::strtold; +} +#endif + +#endif diff --git a/libstdc++-v3/include/c_std/cstring b/libstdc++-v3/include/c_std/cstring new file mode 100644 index 0000000..9708c89 --- /dev/null +++ b/libstdc++-v3/include/c_std/cstring @@ -0,0 +1,117 @@ +// -*- C++ -*- forwarding header. + +// 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: 20.4.6 C library +// + +#ifndef _CPP_CSTRING +#define _CPP_CSTRING 1 + +#include + +#pragma GCC system_header +#include + +// Get rid of those macros defined in in lieu of real functions. +#undef memcpy +#undef memmove +#undef strcpy +#undef strncpy +#undef strcat +#undef strncat +#undef memcmp +#undef strcmp +#undef strcoll +#undef strncmp +#undef strxfrm +#undef memchr +#undef strchr +#undef strcspn +#undef strpbrk +#undef strrchr +#undef strspn +#undef strstr +#undef strtok +#undef memset +#undef strerror +#undef strlen + +namespace std +{ + using ::memcpy; + using ::memmove; + using ::strcpy; + using ::strncpy; + using ::strcat; + using ::strncat; + using ::memcmp; + using ::strcmp; + using ::strcoll; + using ::strncmp; + using ::strxfrm; + using ::strcspn; + using ::strspn; + using ::strtok; + using ::memset; + using ::strerror; + using ::strlen; + + using ::memchr; + + inline void* + memchr(void* __p, int __c, size_t __n) + { return memchr(const_cast(__p), __c, __n); } + + using ::strchr; + + inline char* + strchr(char* __s1, int __n) + { return __builtin_strchr(const_cast(__s1), __n); } + + using ::strpbrk; + + inline char* + strpbrk(char* __s1, const char* __s2) + { return __builtin_strpbrk(const_cast(__s1), __s2); } + + using ::strrchr; + + inline char* + strrchr(char* __s1, int __n) + { return __builtin_strrchr(const_cast(__s1), __n); } + + using ::strstr; + + inline char* + strstr(char* __s1, const char* __s2) + { return __builtin_strstr(const_cast(__s1), __s2); } +} + +#endif diff --git a/libstdc++-v3/include/c_std/ctime b/libstdc++-v3/include/c_std/ctime new file mode 100644 index 0000000..c5c108b --- /dev/null +++ b/libstdc++-v3/include/c_std/ctime @@ -0,0 +1,70 @@ +// -*- C++ -*- forwarding header. + +// 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: 20.5 Date and time +// + +#ifndef _CPP_CTIME +#define _CPP_CTIME 1 + +#include + +#pragma GCC system_header +#include + +// Get rid of those macros defined in in lieu of real functions. +#undef clock +#undef difftime +#undef mktime +#undef time +#undef asctime +#undef ctime +#undef gmtime +#undef localtime +#undef strftime + +namespace std +{ + using ::clock_t; + using ::time_t; + using ::tm; + + using ::clock; + using ::difftime; + using ::mktime; + using ::time; + using ::asctime; + using ::ctime; + using ::gmtime; + using ::localtime; + using ::strftime; +} + +#endif diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar new file mode 100644 index 0000000..8e69d51 --- /dev/null +++ b/libstdc++-v3/include/c_std/cwchar @@ -0,0 +1,232 @@ +// -*- C++ -*- forwarding header. + +// 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.4 +// + +#ifndef _CPP_CWCHAR +#define _CPP_CWCHAR 1 + +#include +#include +#include + +#if _GLIBCPP_HAVE_WCHAR_H +#pragma GCC system_header +#include +#endif + +// Need to do a bit of trickery here with mbstate_t as char_traits +// assumes it is in wchar.h, regardless of wchar_t specializations. +#ifndef _GLIBCPP_HAVE_MBSTATE_T +extern "C" +{ + typedef struct + { + int __fill[6]; + } mbstate_t; +} +#endif + +namespace std +{ + using ::mbstate_t; +} + +// Get rid of those macros defined in in lieu of real functions. +#undef btowc +#undef fgetwc +#undef fgetws +#undef fputwc +#undef fputws +#undef fwide +#undef fwprintf +#undef fwscanf +#undef getwc +#undef getwchar +#undef mbrlen +#undef mbrtowc +#undef mbsinit +#undef mbsrtowcs +#undef putwc +#undef putwchar +#undef swprintf +#undef swscanf +#undef ungetwc +#undef vfwprintf +#undef vfwscanf +#undef vswprintf +#undef vswscanf +#undef vwprintf +#undef vwscanf +#undef wcrtomb +#undef wcscat +#undef wcschr +#undef wcscmp +#undef wcscoll +#undef wcscpy +#undef wcscspn +#undef wcsftime +#undef wcslen +#undef wcsncat +#undef wcsncmp +#undef wcsncpy +#undef wcspbrk +#undef wcsrchr +#undef wcsrtombs +#undef wcsspn +#undef wcsstr +#undef wcstod +#undef wcstof +#undef wcstok +#undef wcstol +#undef wcstoul +#undef wcsxfrm +#undef wctob +#undef wmemchr +#undef wmemcmp +#undef wmemcpy +#undef wmemmove +#undef wmemset +#undef wprintf +#undef wscanf + +#if _GLIBCPP_USE_WCHAR_T +namespace std +{ + using ::wint_t; + + using ::btowc; + using ::fgetwc; + using ::fgetws; + using ::fputwc; + using ::fputws; + using ::fwide; + using ::fwprintf; + using ::fwscanf; + using ::getwc; + using ::getwchar; + using ::mbrlen; + using ::mbrtowc; + using ::mbsinit; + using ::mbsrtowcs; + using ::putwc; + using ::putwchar; + using ::swprintf; + using ::swscanf; + using ::ungetwc; + using ::vfwprintf; + using ::vfwscanf; + using ::vswprintf; + using ::vswscanf; + using ::vwprintf; + using ::vwscanf; + using ::wcrtomb; + using ::wcscat; + using ::wcscmp; + using ::wcscoll; + using ::wcscpy; + using ::wcscspn; + using ::wcsftime; + using ::wcslen; + using ::wcsncat; + using ::wcsncmp; + using ::wcsncpy; + using ::wcsrtombs; + using ::wcsspn; + using ::wcstod; + using ::wcstof; + using ::wcstok; + using ::wcstol; + using ::wcstoul; + using ::wcsxfrm; + using ::wctob; + using ::wmemcmp; + using ::wmemcpy; + using ::wmemmove; + using ::wmemset; + using ::wprintf; + using ::wscanf; + + using ::wcschr; + + inline wchar_t* + wcschr(wchar_t* __p, wchar_t __c) + { return wcschr(const_cast(__p), __c); } + + using ::wcspbrk; + + inline wchar_t* + wcspbrk(wchar_t* __s1, wchar_t* __s2) + { return wcspbrk(const_cast(__s1), __s2); } + + using ::wcsrchr; + + inline wchar_t* + wcsrchr(wchar_t* __p, wchar_t __c) + { return wcsrchr(const_cast(__p), __c); } + + using ::wcsstr; + + inline wchar_t* + wcsstr(wchar_t* __s1, wchar_t* __s2) + { return wcsstr(const_cast(__s1), __s2); } + + using ::wmemchr; + + inline wchar_t* + wmemchr(wchar_t* __p, wchar_t __c, size_t __n) + { return wmemchr(const_cast(__p), __c, __n); } +} + +#if _GLIBCPP_USE_C99 + +#undef wcstold +#undef wcstoll +#undef wcstoull + +namespace __gnu_cxx +{ + using ::wcstold; + using ::wcstoll; + using ::wcstoull; +} + +namespace std +{ + using __gnu_cxx::wcstold; + using __gnu_cxx::wcstoll; + using __gnu_cxx::wcstoull; +} +#endif + +#endif //_GLIBCPP_USE_WCHAR_T + +#endif diff --git a/libstdc++-v3/include/c_std/cwctype b/libstdc++-v3/include/c_std/cwctype new file mode 100644 index 0000000..39ae076 --- /dev/null +++ b/libstdc++-v3/include/c_std/cwctype @@ -0,0 +1,89 @@ +// -*- C++ -*- forwarding header. + +// 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: +// + +#ifndef _CPP_CWCTYPE +#define _CPP_CWCTYPE 1 + +#pragma GCC system_header +#include + +// Get rid of those macros defined in in lieu of real functions. +#undef iswalnum +#undef iswalpha +#undef iswblank +#undef iswcntrl +#undef iswdigit +#undef iswgraph +#undef iswlower +#undef iswprint +#undef iswprint +#undef iswpunct +#undef iswspace +#undef iswupper +#undef iswxdigit +#undef iswctype +#undef towlower +#undef towupper +#undef towctrans +#undef wctrans +#undef wctype + +namespace std +{ + using ::wint_t; // cwchar + + using ::wctype_t; + using ::wctrans_t; + + using ::iswalnum; + using ::iswalpha; + using ::iswblank; + using ::iswcntrl; + using ::iswdigit; + using ::iswgraph; + using ::iswlower; + using ::iswprint; + using ::iswprint; + using ::iswpunct; + using ::iswspace; + using ::iswupper; + using ::iswxdigit; + using ::iswctype; + using ::towlower; + using ::towupper; + using ::towctrans; + using ::wctrans; + using ::wctype; +} + +#endif diff --git a/libstdc++-v3/include/ext/algorithm b/libstdc++-v3/include/ext/algorithm index 588c722..5b7fbff 100644 --- a/libstdc++-v3/include/ext/algorithm +++ b/libstdc++-v3/include/ext/algorithm @@ -57,7 +57,7 @@ #define _EXT_ALGORITHM #pragma GCC system_header -#include +#include namespace __gnu_cxx { diff --git a/libstdc++-v3/include/ext/functional b/libstdc++-v3/include/ext/functional index 8a17161..cee3558 100644 --- a/libstdc++-v3/include/ext/functional +++ b/libstdc++-v3/include/ext/functional @@ -57,7 +57,7 @@ #define _EXT_FUNCTIONAL #pragma GCC system_header -#include +#include namespace __gnu_cxx { diff --git a/libstdc++-v3/include/ext/iterator b/libstdc++-v3/include/ext/iterator index 73fd6c8..c7acdda 100644 --- a/libstdc++-v3/include/ext/iterator +++ b/libstdc++-v3/include/ext/iterator @@ -63,7 +63,7 @@ #pragma GCC system_header #include -#include +#include namespace __gnu_cxx { diff --git a/libstdc++-v3/include/ext/memory b/libstdc++-v3/include/ext/memory index 84c31f0..73fa427 100644 --- a/libstdc++-v3/include/ext/memory +++ b/libstdc++-v3/include/ext/memory @@ -57,7 +57,7 @@ #define _EXT_MEMORY #pragma GCC system_header -#include +#include namespace __gnu_cxx { diff --git a/libstdc++-v3/include/ext/numeric b/libstdc++-v3/include/ext/numeric index 9336467..5b33a89 100644 --- a/libstdc++-v3/include/ext/numeric +++ b/libstdc++-v3/include/ext/numeric @@ -58,7 +58,7 @@ #pragma GCC system_header #include -#include +#include #include // For identity_element diff --git a/libstdc++-v3/include/ext/ropeimpl.h b/libstdc++-v3/include/ext/ropeimpl.h index b3e694c..19618ef 100644 --- a/libstdc++-v3/include/ext/ropeimpl.h +++ b/libstdc++-v3/include/ext/ropeimpl.h @@ -45,8 +45,8 @@ * You should not attempt to use it directly. */ -#include -#include +#include +#include #include #include // For copy_n and lexicographical_compare_3way diff --git a/libstdc++-v3/include/ext/stl_hash_fun.h b/libstdc++-v3/include/ext/stl_hash_fun.h index 64ddab8..c251ed3 100644 --- a/libstdc++-v3/include/ext/stl_hash_fun.h +++ b/libstdc++-v3/include/ext/stl_hash_fun.h @@ -61,7 +61,7 @@ #ifndef _CPP_BITS_STL_HASH_FUN_H #define _CPP_BITS_STL_HASH_FUN_H 1 -#include +#include namespace __gnu_cxx { diff --git a/libstdc++-v3/include/std/algorithm b/libstdc++-v3/include/std/algorithm index 33ed872..746eb47 100644 --- a/libstdc++-v3/include/std/algorithm +++ b/libstdc++-v3/include/std/algorithm @@ -1,4 +1,4 @@ -// -*- C++ -*- std header. +// -*- C++ -*- // Copyright (C) 2001 Free Software Foundation, Inc. // @@ -27,11 +27,50 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file algorithm - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +/* + * + * 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 -#include -#endif +#define _CPP_ALGORITHM 1 + +#pragma GCC system_header + +#include +#include +#include +#include +#include + +#endif /* _CPP_ALGORITHM */ + +// Local Variables: +// mode:C++ +// End: diff --git a/libstdc++-v3/include/std/bitset b/libstdc++-v3/include/std/bitset index 830ee7c..d9119e1 100644 --- a/libstdc++-v3/include/std/bitset +++ b/libstdc++-v3/include/std/bitset @@ -1,4 +1,4 @@ -// -*- C++ -*- std header. +// -*- C++ -*- // Copyright (C) 2001 Free Software Foundation, Inc. // @@ -27,11 +27,788 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file bitset - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +/* + * 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 _CPP_BITSET -#include -#endif +#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 // for size_t +#include // for memset +#include +#include +#include // for invalid_argument, out_of_range, + // overflow_error +#include // for ostream (operator<<) +#include // 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 +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 +struct _First_one { + static unsigned char _S_first_one[256]; +}; + +// +// Base class: general case. +// + +template +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::_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 +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 +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 +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 _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(__thisword & (~(unsigned char)0)); + if ( __this_byte ) + return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT + + _First_one::_S_first_one[__this_byte]; + + __thisword >>= CHAR_BIT; + } + } + } + // not found, so return an indication of failure. + return __not_found; +} + +template +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(__thisword & (~(unsigned char)0)); + if ( __this_byte ) + return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT + + _First_one::_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(__thisword & (~(unsigned char)0)); + if ( __this_byte ) + return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT + + _First_one::_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::_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 struct _Sanitize { + static void _M_do_sanitize(unsigned long& __val) + { __val &= ~((~static_cast(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 +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 + 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 + 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 + 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 + void _M_copy_from_string(const basic_string<_CharT,_Traits,_Alloc>& __s, + size_t, + size_t); + + template + 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 +template +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 +template +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 +inline bitset<_Nb> operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) { + bitset<_Nb> __result(__x); + __result &= __y; + return __result; +} + + +template +inline bitset<_Nb> operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y) { + bitset<_Nb> __result(__x); + __result |= __y; + return __result; +} + +template +inline bitset<_Nb> operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) { + bitset<_Nb> __result(__x); + __result ^= __y; + return __result; +} + +template +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(0), _Nb); + } + + return __is; +} + +template +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/cassert b/libstdc++-v3/include/std/cassert deleted file mode 100644 index 5cb1e01..0000000 --- a/libstdc++-v3/include/std/cassert +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file cassert - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c assert.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - -// This one should not have include guards. -#include - diff --git a/libstdc++-v3/include/std/cctype b/libstdc++-v3/include/std/cctype deleted file mode 100644 index b5bf928..0000000 --- a/libstdc++-v3/include/std/cctype +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file cctype - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c ctype.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - -#ifndef _CPP_CCTYPE -#include -#endif diff --git a/libstdc++-v3/include/std/cerrno b/libstdc++-v3/include/std/cerrno deleted file mode 100644 index 0c17749..0000000 --- a/libstdc++-v3/include/std/cerrno +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file cerrno - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c errno.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - -#ifndef _CPP_CERRNO -#include -#endif diff --git a/libstdc++-v3/include/std/cfloat b/libstdc++-v3/include/std/cfloat deleted file mode 100644 index fa5756d..0000000 --- a/libstdc++-v3/include/std/cfloat +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file cfloat - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c float.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - -#ifndef _CPP_CFLOAT -#include -#endif diff --git a/libstdc++-v3/include/std/ciso646 b/libstdc++-v3/include/std/ciso646 deleted file mode 100644 index c9f49fb..0000000 --- a/libstdc++-v3/include/std/ciso646 +++ /dev/null @@ -1,38 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file ciso646 - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c iso646.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - diff --git a/libstdc++-v3/include/std/climits b/libstdc++-v3/include/std/climits deleted file mode 100644 index 345ad61..0000000 --- a/libstdc++-v3/include/std/climits +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file climits - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c limits.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - -#ifndef _CPP_CLIMITS -#include -#endif diff --git a/libstdc++-v3/include/std/clocale b/libstdc++-v3/include/std/clocale deleted file mode 100644 index 3775010..0000000 --- a/libstdc++-v3/include/std/clocale +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file clocale - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c locale.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - -#ifndef _CPP_CLOCALE -#include -#endif diff --git a/libstdc++-v3/include/std/cmath b/libstdc++-v3/include/std/cmath deleted file mode 100644 index d565307..0000000 --- a/libstdc++-v3/include/std/cmath +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file cmath - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c math.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - -#ifndef _CPP_CMATH -#include -#endif diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex index 6b7abcf..18dd867 100644 --- a/libstdc++-v3/include/std/complex +++ b/libstdc++-v3/include/std/complex @@ -1,6 +1,6 @@ -// -*- C++ -*- std header. +// The template and inlines for the -*- C++ -*- complex number classes. -// Copyright (C) 2001 Free Software Foundation, Inc. +// 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 @@ -27,11 +27,1032 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file complex - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +// +// ISO C++ 14882: 26.2 Complex Numbers +// Note: this is not a conforming implementation. +// Initially implemented by Ulrich Drepper +// Improved by Gabriel Dos Reis +// + +/** @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 -#include +#define _CPP_COMPLEX 1 + +#pragma GCC system_header + +#include +#include +#include +#include + +namespace std +{ + // Forward declarations + template class complex; + template<> class complex; + template<> class complex; + template<> class complex; + + template _Tp abs(const complex<_Tp>&); + template _Tp arg(const complex<_Tp>&); + template _Tp norm(const complex<_Tp>&); + + template complex<_Tp> conj(const complex<_Tp>&); + template complex<_Tp> polar(const _Tp&, const _Tp& = 0); + + // Transcendentals: + template complex<_Tp> cos(const complex<_Tp>&); + template complex<_Tp> cosh(const complex<_Tp>&); + template complex<_Tp> exp(const complex<_Tp>&); + template complex<_Tp> log(const complex<_Tp>&); + template complex<_Tp> log10(const complex<_Tp>&); + template complex<_Tp> pow(const complex<_Tp>&, int); + template complex<_Tp> pow(const complex<_Tp>&, const _Tp&); + template complex<_Tp> pow(const complex<_Tp>&, + const complex<_Tp>&); + template complex<_Tp> pow(const _Tp&, const complex<_Tp>&); + template complex<_Tp> sin(const complex<_Tp>&); + template complex<_Tp> sinh(const complex<_Tp>&); + template complex<_Tp> sqrt(const complex<_Tp>&); + template complex<_Tp> tan(const complex<_Tp>&); + template complex<_Tp> tanh(const complex<_Tp>&); + + + // 26.2.2 Primary template class complex + template + 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 + 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 + complex<_Tp>& operator=(const complex<_Up>&); + template + complex<_Tp>& operator+=(const complex<_Up>&); + template + complex<_Tp>& operator-=(const complex<_Up>&); + template + complex<_Tp>& operator*=(const complex<_Up>&); + template + complex<_Tp>& operator/=(const complex<_Up>&); + + private: + _Tp _M_real, _M_imag; + }; + + template + inline _Tp + complex<_Tp>::real() const { return _M_real; } + + template + inline _Tp + complex<_Tp>::imag() const { return _M_imag; } + + template + inline + complex<_Tp>::complex(const _Tp& __r, const _Tp& __i) + : _M_real(__r), _M_imag(__i) { } + + template + template + inline + complex<_Tp>::complex(const complex<_Up>& __z) + : _M_real(__z.real()), _M_imag(__z.imag()) { } + + template + complex<_Tp>& + complex<_Tp>::operator=(const _Tp& __t) + { + _M_real = __t; + _M_imag = _Tp(); + return *this; + } + + // 26.2.5/1 + template + inline complex<_Tp>& + complex<_Tp>::operator+=(const _Tp& __t) + { + _M_real += __t; + return *this; + } + + // 26.2.5/3 + template + inline complex<_Tp>& + complex<_Tp>::operator-=(const _Tp& __t) + { + _M_real -= __t; + return *this; + } + + // 26.2.5/5 + template + complex<_Tp>& + complex<_Tp>::operator*=(const _Tp& __t) + { + _M_real *= __t; + _M_imag *= __t; + return *this; + } + + // 26.2.5/7 + template + complex<_Tp>& + complex<_Tp>::operator/=(const _Tp& __t) + { + _M_real /= __t; + _M_imag /= __t; + return *this; + } + + template + template + complex<_Tp>& + complex<_Tp>::operator=(const complex<_Up>& __z) + { + _M_real = __z.real(); + _M_imag = __z.imag(); + return *this; + } + + // 26.2.5/9 + template + template + complex<_Tp>& + complex<_Tp>::operator+=(const complex<_Up>& __z) + { + _M_real += __z.real(); + _M_imag += __z.imag(); + return *this; + } + + // 26.2.5/11 + template + template + 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 + template + 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 + template + 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 + inline complex<_Tp> + operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return complex<_Tp> (__x) += __y; } + + template + inline complex<_Tp> + operator+(const complex<_Tp>& __x, const _Tp& __y) + { return complex<_Tp> (__x) += __y; } + + template + inline complex<_Tp> + operator+(const _Tp& __x, const complex<_Tp>& __y) + { return complex<_Tp> (__y) += __x; } + + template + inline complex<_Tp> + operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return complex<_Tp> (__x) -= __y; } + + template + inline complex<_Tp> + operator-(const complex<_Tp>& __x, const _Tp& __y) + { return complex<_Tp> (__x) -= __y; } + + template + inline complex<_Tp> + operator-(const _Tp& __x, const complex<_Tp>& __y) + { return complex<_Tp> (__x) -= __y; } + + template + inline complex<_Tp> + operator*(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return complex<_Tp> (__x) *= __y; } + + template + inline complex<_Tp> + operator*(const complex<_Tp>& __x, const _Tp& __y) + { return complex<_Tp> (__x) *= __y; } + + template + inline complex<_Tp> + operator*(const _Tp& __x, const complex<_Tp>& __y) + { return complex<_Tp> (__y) *= __x; } + + template + inline complex<_Tp> + operator/(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return complex<_Tp> (__x) /= __y; } + + template + inline complex<_Tp> + operator/(const complex<_Tp>& __x, const _Tp& __y) + { return complex<_Tp> (__x) /= __y; } + + template + inline complex<_Tp> + operator/(const _Tp& __x, const complex<_Tp>& __y) + { return complex<_Tp> (__x) /= __y; } + + template + inline complex<_Tp> + operator+(const complex<_Tp>& __x) + { return __x; } + + template + inline complex<_Tp> + operator-(const complex<_Tp>& __x) + { return complex<_Tp>(-__x.real(), -__x.imag()); } + + template + inline bool + operator==(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return __x.real() == __y.real() && __x.imag() == __y.imag(); } + + template + inline bool + operator==(const complex<_Tp>& __x, const _Tp& __y) + { return __x.real() == __y && __x.imag() == _Tp(); } + + template + inline bool + operator==(const _Tp& __x, const complex<_Tp>& __y) + { return __x == __y.real() && _Tp() == __y.imag(); } + + template + inline bool + operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return __x.real() != __y.real() || __x.imag() != __y.imag(); } + + template + inline bool + operator!=(const complex<_Tp>& __x, const _Tp& __y) + { return __x.real() != __y || __x.imag() != _Tp(); } + + template + inline bool + operator!=(const _Tp& __x, const complex<_Tp>& __y) + { return __x != __y.real() || _Tp() != __y.imag(); } + + template + 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 + 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 + inline _Tp + real(const complex<_Tp>& __z) + { return __z.real(); } + + template + inline _Tp + imag(const complex<_Tp>& __z) + { return __z.imag(); } + + template + 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 + 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 + struct _Norm_helper + { + template + 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 + { + template + static inline _Tp _S_do_it(const complex<_Tp>& __z) + { + _Tp __res = abs(__z); + return __res * __res; + } + }; + + template + inline _Tp + norm(const complex<_Tp>& __z) + { + return _Norm_helper<__is_floating<_Tp>::_M_type>::_S_do_it(__z); + } + + template + inline complex<_Tp> + polar(const _Tp& __rho, const _Tp& __theta) + { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); } + + template + inline complex<_Tp> + conj(const complex<_Tp>& __z) + { return complex<_Tp>(__z.real(), -__z.imag()); } + + // Transcendentals + template + 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 + 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 + inline complex<_Tp> + exp(const complex<_Tp>& __z) + { return polar(exp(__z.real()), __z.imag()); } + + template + inline complex<_Tp> + log(const complex<_Tp>& __z) + { return complex<_Tp>(log(abs(__z)), arg(__z)); } + + template + inline complex<_Tp> + log10(const complex<_Tp>& __z) + { return log(__z) / log(_Tp(10.0)); } + + template + 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 + 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 + 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 + inline complex<_Tp> + tan(const complex<_Tp>& __z) + { + return sin(__z) / cos(__z); + } + + template + inline complex<_Tp> + tanh(const complex<_Tp>& __z) + { + return sinh(__z) / cosh(__z); + } + + template + inline complex<_Tp> + pow(const complex<_Tp>& __z, int __n) + { + return __pow_helper(__z, __n); + } + + template + inline complex<_Tp> + pow(const complex<_Tp>& __x, const _Tp& __y) + { + return exp(__y * log(__x)); + } + + template + inline complex<_Tp> + pow(const complex<_Tp>& __x, const complex<_Tp>& __y) + { + return exp(__y * log(__x)); + } + + template + inline complex<_Tp> + pow(const _Tp& __x, const complex<_Tp>& __y) + { + return exp(__y * log(__x)); + } + + // 26.2.3 complex specializations + // complex specialization + template<> class complex + { + 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&); + explicit complex(const complex&); + + float real() const; + float imag() const; + + complex& operator=(float); + complex& operator+=(float); + complex& operator-=(float); + complex& operator*=(float); + complex& operator/=(float); + + // Let's the compiler synthetize the copy and assignment + // operator. It always does a pretty good job. + // complex& operator= (const complex&); + template + complex&operator=(const complex<_Tp>&); + template + complex& operator+=(const complex<_Tp>&); + template + complex& operator-=(const complex<_Tp>&); + template + complex& operator*=(const complex<_Tp>&); + template + complex&operator/=(const complex<_Tp>&); + + private: + typedef __complex__ float _ComplexT; + _ComplexT _M_value; + + complex(_ComplexT __z) : _M_value(__z) { } + + friend class complex; + friend class complex; + }; + + inline float + complex::real() const + { return __real__ _M_value; } + + inline float + complex::imag() const + { return __imag__ _M_value; } + + inline + complex::complex(float r, float i) + { + __real__ _M_value = r; + __imag__ _M_value = i; + } + + inline complex& + complex::operator=(float __f) + { + __real__ _M_value = __f; + __imag__ _M_value = 0.0f; + return *this; + } + + inline complex& + complex::operator+=(float __f) + { + __real__ _M_value += __f; + return *this; + } + + inline complex& + complex::operator-=(float __f) + { + __real__ _M_value -= __f; + return *this; + } + + inline complex& + complex::operator*=(float __f) + { + _M_value *= __f; + return *this; + } + + inline complex& + complex::operator/=(float __f) + { + _M_value /= __f; + return *this; + } + + template + inline complex& + complex::operator=(const complex<_Tp>& __z) + { + __real__ _M_value = __z.real(); + __imag__ _M_value = __z.imag(); + return *this; + } + + template + inline complex& + complex::operator+=(const complex<_Tp>& __z) + { + __real__ _M_value += __z.real(); + __imag__ _M_value += __z.imag(); + return *this; + } + + template + inline complex& + complex::operator-=(const complex<_Tp>& __z) + { + __real__ _M_value -= __z.real(); + __imag__ _M_value -= __z.imag(); + return *this; + } + + template + inline complex& + complex::operator*=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value *= __t; + return *this; + } + + template + inline complex& + complex::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 specialization + template<> class complex + { + 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&); + explicit complex(const complex&); + + double real() const; + double imag() const; + + complex& operator=(double); + complex& operator+=(double); + complex& operator-=(double); + complex& operator*=(double); + complex& operator/=(double); + + // The compiler will synthetize this, efficiently. + // complex& operator= (const complex&); + template + complex& operator=(const complex<_Tp>&); + template + complex& operator+=(const complex<_Tp>&); + template + complex& operator-=(const complex<_Tp>&); + template + complex& operator*=(const complex<_Tp>&); + template + complex& operator/=(const complex<_Tp>&); + + private: + typedef __complex__ double _ComplexT; + _ComplexT _M_value; + + complex(_ComplexT __z) : _M_value(__z) { } + + friend class complex; + friend class complex; + }; + + inline double + complex::real() const + { return __real__ _M_value; } + + inline double + complex::imag() const + { return __imag__ _M_value; } + + inline + complex::complex(double __r, double __i) + { + __real__ _M_value = __r; + __imag__ _M_value = __i; + } + + inline complex& + complex::operator=(double __d) + { + __real__ _M_value = __d; + __imag__ _M_value = 0.0; + return *this; + } + + inline complex& + complex::operator+=(double __d) + { + __real__ _M_value += __d; + return *this; + } + + inline complex& + complex::operator-=(double __d) + { + __real__ _M_value -= __d; + return *this; + } + + inline complex& + complex::operator*=(double __d) + { + _M_value *= __d; + return *this; + } + + inline complex& + complex::operator/=(double __d) + { + _M_value /= __d; + return *this; + } + + template + inline complex& + complex::operator=(const complex<_Tp>& __z) + { + __real__ _M_value = __z.real(); + __imag__ _M_value = __z.imag(); + return *this; + } + + template + inline complex& + complex::operator+=(const complex<_Tp>& __z) + { + __real__ _M_value += __z.real(); + __imag__ _M_value += __z.imag(); + return *this; + } + + template + inline complex& + complex::operator-=(const complex<_Tp>& __z) + { + __real__ _M_value -= __z.real(); + __imag__ _M_value -= __z.imag(); + return *this; + } + + template + inline complex& + complex::operator*=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value *= __t; + return *this; + } + + template + inline complex& + complex::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 specialization + template<> class complex + { + 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&); + complex(const complex&); + + long double real() const; + long double imag() const; + + complex& operator= (long double); + complex& operator+= (long double); + complex& operator-= (long double); + complex& operator*= (long double); + complex& operator/= (long double); + + // The compiler knows how to do this efficiently + // complex& operator= (const complex&); + template + complex& operator=(const complex<_Tp>&); + template + complex& operator+=(const complex<_Tp>&); + template + complex& operator-=(const complex<_Tp>&); + template + complex& operator*=(const complex<_Tp>&); + template + complex& operator/=(const complex<_Tp>&); + + private: + typedef __complex__ long double _ComplexT; + _ComplexT _M_value; + + complex(_ComplexT __z) : _M_value(__z) { } + + friend class complex; + friend class complex; + }; + + inline + complex::complex(long double __r, long double __i) + { + __real__ _M_value = __r; + __imag__ _M_value = __i; + } + + inline long double + complex::real() const + { return __real__ _M_value; } + + inline long double + complex::imag() const + { return __imag__ _M_value; } + + inline complex& + complex::operator=(long double __r) + { + __real__ _M_value = __r; + __imag__ _M_value = 0.0L; + return *this; + } + + inline complex& + complex::operator+=(long double __r) + { + __real__ _M_value += __r; + return *this; + } + + inline complex& + complex::operator-=(long double __r) + { + __real__ _M_value -= __r; + return *this; + } + + inline complex& + complex::operator*=(long double __r) + { + _M_value *= __r; + return *this; + } + + inline complex& + complex::operator/=(long double __r) + { + _M_value /= __r; + return *this; + } + + template + inline complex& + complex::operator=(const complex<_Tp>& __z) + { + __real__ _M_value = __z.real(); + __imag__ _M_value = __z.imag(); + return *this; + } + + template + inline complex& + complex::operator+=(const complex<_Tp>& __z) + { + __real__ _M_value += __z.real(); + __imag__ _M_value += __z.imag(); + return *this; + } + + template + inline complex& + complex::operator-=(const complex<_Tp>& __z) + { + __real__ _M_value -= __z.real(); + __imag__ _M_value -= __z.imag(); + return *this; + } + + template + inline complex& + complex::operator*=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value *= __t; + return *this; + } + + template + inline complex& + complex::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::complex(const complex& __z) + : _M_value(_ComplexT(__z._M_value)) { } + + inline + complex::complex(const complex& __z) + : _M_value(_ComplexT(__z._M_value)) { } + + inline + complex::complex(const complex& __z) + : _M_value(_ComplexT(__z._M_value)) { } + + inline + complex::complex(const complex& __z) + { + __real__ _M_value = __z.real(); + __imag__ _M_value = __z.imag(); + } + + inline + complex::complex(const complex& __z) + : _M_value(_ComplexT(__z._M_value)) { } + + inline + complex::complex(const complex& __z) + : _M_value(_ComplexT(__z._M_value)) { } +} // namespace std + +#endif /* _CPP_COMPLEX */ diff --git a/libstdc++-v3/include/std/csetjmp b/libstdc++-v3/include/std/csetjmp deleted file mode 100644 index daf11b3..0000000 --- a/libstdc++-v3/include/std/csetjmp +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file csetjmp - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c setjmp.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - -#ifndef _CPP_CSETJMP -#include -#endif diff --git a/libstdc++-v3/include/std/csignal b/libstdc++-v3/include/std/csignal deleted file mode 100644 index 3790ff5..0000000 --- a/libstdc++-v3/include/std/csignal +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file csignal - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c signal.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - -#ifndef _CPP_CSIGNAL -#include -#endif diff --git a/libstdc++-v3/include/std/cstdarg b/libstdc++-v3/include/std/cstdarg deleted file mode 100644 index 8dfe625..0000000 --- a/libstdc++-v3/include/std/cstdarg +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file cstdarg - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c stdarg.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - -#ifndef _CPP_CSTDARG -#include -#endif diff --git a/libstdc++-v3/include/std/cstddef b/libstdc++-v3/include/std/cstddef deleted file mode 100644 index 4b3d1f5..0000000 --- a/libstdc++-v3/include/std/cstddef +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file cstddef - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c stddef.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - -#ifndef _CPP_CSTDDEF -#include -#endif diff --git a/libstdc++-v3/include/std/cstdio b/libstdc++-v3/include/std/cstdio deleted file mode 100644 index b546585..0000000 --- a/libstdc++-v3/include/std/cstdio +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file cstdio - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c stdio.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - -#ifndef _CPP_CSTDIO -#include -#endif diff --git a/libstdc++-v3/include/std/cstdlib b/libstdc++-v3/include/std/cstdlib deleted file mode 100644 index 2feeb53..0000000 --- a/libstdc++-v3/include/std/cstdlib +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file cstdlib - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c stdlib.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - -#ifndef _CPP_CSTDLIB -#include -#endif diff --git a/libstdc++-v3/include/std/cstring b/libstdc++-v3/include/std/cstring deleted file mode 100644 index 5652803..0000000 --- a/libstdc++-v3/include/std/cstring +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file cstring - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c string.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - -#ifndef _CPP_CSTRING -#include -#endif diff --git a/libstdc++-v3/include/std/ctime b/libstdc++-v3/include/std/ctime deleted file mode 100644 index e1d6bc9..0000000 --- a/libstdc++-v3/include/std/ctime +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file ctime - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c time.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - -#ifndef _CPP_CTIME -#include -#endif diff --git a/libstdc++-v3/include/std/cwchar b/libstdc++-v3/include/std/cwchar deleted file mode 100644 index aa928d7..0000000 --- a/libstdc++-v3/include/std/cwchar +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file cwchar - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c wchar.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - -#ifndef _CPP_CWCHAR -#include -#endif diff --git a/libstdc++-v3/include/std/cwctype b/libstdc++-v3/include/std/cwctype deleted file mode 100644 index b0de79e..0000000 --- a/libstdc++-v3/include/std/cwctype +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- std header. - -// 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. - -/** @file cwctype - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. - * - * This is the C++ version of the Standard C Library header @c wctype.h, - * and its contents are (mostly) the same as that header, but are all - * contained in the namespace @c std. - */ - -#ifndef _CPP_CWCTYPE -#include -#endif diff --git a/libstdc++-v3/include/std/deque b/libstdc++-v3/include/std/deque index 222d7ca..394eef3 100644 --- a/libstdc++-v3/include/std/deque +++ b/libstdc++-v3/include/std/deque @@ -1,4 +1,4 @@ -// -*- C++ -*- std header. +// -*- C++ -*- // Copyright (C) 2001 Free Software Foundation, Inc. // @@ -27,11 +27,51 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file deque - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +/* + * + * 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 -#include -#endif +#define _CPP_DEQUE 1 + +#pragma GCC system_header + +#include +#include +#include +#include +#include +#include + +#endif /* _CPP_DEQUE */ + +// Local Variables: +// mode:C++ +// End: diff --git a/libstdc++-v3/include/std/fstream b/libstdc++-v3/include/std/fstream index 9d6fcfc..350a691 100644 --- a/libstdc++-v3/include/std/fstream +++ b/libstdc++-v3/include/std/fstream @@ -1,6 +1,6 @@ -// -*- C++ -*- std header. +// File based streams -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// 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 @@ -27,11 +27,408 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file fstream - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +// +// 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 -#include +#define _CPP_FSTREAM 1 + +#pragma GCC system_header + +#include +#include +#include +#include // For codecvt +#include + +namespace std +{ + template + 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 __streambuf_type; + typedef basic_filebuf __filebuf_type; + typedef __basic_file __file_type; + typedef typename traits_type::state_type __state_type; + typedef codecvt __codecvt_type; + typedef typename __codecvt_type::result __res_type; + typedef ctype __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(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; + if (__testput) + { + // Make sure that libio resyncs its idea of the file position + // with the external file. + _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 + 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 __filebuf_type; + typedef basic_istream __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 + 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 __filebuf_type; + typedef basic_ostream __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()) + setstate(ios_base::failbit); + } + }; + + + // 27.8.1.11 Template class basic_fstream + template + 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 __filebuf_type; + typedef basic_ios __ios_type; + typedef basic_iostream __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 #endif +#endif + +#endif + diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index 10c5525..16702ca 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -1,4 +1,4 @@ -// -*- C++ -*- std header. +// -*- C++ -*- // Copyright (C) 2001 Free Software Foundation, Inc. // @@ -27,11 +27,36 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file functional - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +/* + * 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 -#include -#endif +#define _CPP_FUNCTIONAL 1 + +#pragma GCC system_header +#include +#include +#include + +#endif /* _CPP_FUNCTIONAL */ + +// Local Variables: +// mode:C++ +// End: + diff --git a/libstdc++-v3/include/std/iomanip b/libstdc++-v3/include/std/iomanip index 5659918..ab279d2 100644 --- a/libstdc++-v3/include/std/iomanip +++ b/libstdc++-v3/include/std/iomanip @@ -1,6 +1,6 @@ -// -*- C++ -*- std header. +// Standard stream manipulators -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// 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 @@ -27,11 +27,195 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file iomanip - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +// +// 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 -#include -#endif +#define _CPP_IOMANIP 1 + +#pragma GCC system_header + +#include +#include +#include + +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 + basic_istream<_CharT,_Traits>& + operator>>(basic_istream<_CharT,_Traits>& __is, _Resetiosflags __f) + { + __is.setf(ios_base::fmtflags(0), __f._M_mask); + return __is; + } + + template + 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 + basic_istream<_CharT,_Traits>& + operator>>(basic_istream<_CharT,_Traits>& __is, _Setiosflags __f) + { + __is.setf(__f._M_mask); + return __is; + } + + template + 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 + 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 + 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 + struct _Setfill { _CharT _M_c; }; + + template + _Setfill<_CharT> + setfill(_CharT __c) + { + _Setfill<_CharT> __x; + __x._M_c = __c; + return __x; + } + + template + basic_istream<_CharT,_Traits>& + operator>>(basic_istream<_CharT,_Traits>& __is, _Setfill<_CharT> __f) + { + __is.fill(__f._M_c); + return __is; + } + + template + 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 + basic_istream<_CharT,_Traits>& + operator>>(basic_istream<_CharT,_Traits>& __is, _Setprecision __f) + { + __is.precision(__f._M_n); + return __is; + } + + template + 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 + basic_istream<_CharT,_Traits>& + operator>>(basic_istream<_CharT,_Traits>& __is, _Setw __f) + { + __is.width(__f._M_n); + return __is; + } + + template + 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 index a017dd8..1e61c36 100644 --- a/libstdc++-v3/include/std/ios +++ b/libstdc++-v3/include/std/ios @@ -1,6 +1,6 @@ -// -*- C++ -*- std header. +// Iostreams base classes -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// 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 @@ -27,11 +27,28 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file ios - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +// +// 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 -#include -#endif +#define _CPP_IOS 1 + +#pragma GCC system_header + +#include +#include // For ios_base::failure +#include // For char_traits, streamoff, streamsize, fpos +#include // For SEEK_SET, SEEK_CUR, SEEK_END +#include // For class locale +#include // For ios_base declarations. +#include +#include + +#endif /* _CPP_IOS */ + diff --git a/libstdc++-v3/include/std/iosfwd b/libstdc++-v3/include/std/iosfwd index e48516a..93c30b3 100644 --- a/libstdc++-v3/include/std/iosfwd +++ b/libstdc++-v3/include/std/iosfwd @@ -1,6 +1,6 @@ -// -*- C++ -*- std header. +// Forwarding declarations -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// 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 @@ -27,11 +27,110 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file iosfwd - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +// +// 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 -#include +#define _CPP_IOSFWD 1 + +#pragma GCC system_header + +#include +#include // For string forward declarations. +#include +#include + +namespace std +{ + template > + class basic_ios; + + template > + class basic_streambuf; + + template > + class basic_istream; + + template > + class basic_ostream; + + template > + class basic_iostream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_stringbuf; + + template, + typename _Alloc = allocator<_CharT> > + class basic_istringstream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_ostringstream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_stringstream; + + template > + class basic_filebuf; + + template > + class basic_ifstream; + + template > + class basic_ofstream; + + template > + class basic_fstream; + + template > + class istreambuf_iterator; + + template > + class ostreambuf_iterator; + +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS + // Not included. (??? Apparently no LWG number?) + class ios_base; +#endif + + typedef basic_ios ios; + typedef basic_streambuf streambuf; + typedef basic_istream istream; + typedef basic_ostream ostream; + typedef basic_iostream iostream; + typedef basic_stringbuf stringbuf; + typedef basic_istringstream istringstream; + typedef basic_ostringstream ostringstream; + typedef basic_stringstream stringstream; + typedef basic_filebuf filebuf; + typedef basic_ifstream ifstream; + typedef basic_ofstream ofstream; + typedef basic_fstream fstream; + +#ifdef _GLIBCPP_USE_WCHAR_T + typedef basic_ios wios; + typedef basic_streambuf wstreambuf; + typedef basic_istream wistream; + typedef basic_ostream wostream; + typedef basic_iostream wiostream; + typedef basic_stringbuf wstringbuf; + typedef basic_istringstream wistringstream; + typedef basic_ostringstream wostringstream; + typedef basic_stringstream wstringstream; + typedef basic_filebuf wfilebuf; + typedef basic_ifstream wifstream; + typedef basic_ofstream wofstream; + typedef basic_fstream wfstream; +#endif +} // namespace std + #endif diff --git a/libstdc++-v3/include/std/iostream b/libstdc++-v3/include/std/iostream index a8098c6..47b8379 100644 --- a/libstdc++-v3/include/std/iostream +++ b/libstdc++-v3/include/std/iostream @@ -1,6 +1,6 @@ -// -*- C++ -*- std header. +// Standard iostream objects -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// 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 @@ -27,13 +27,39 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file iostream - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +// +// 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 -#include +#define _CPP_IOSTREAM 1 + +#pragma GCC system_header + +#include +#include +#include + +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 index c383506..7b51852 100644 --- a/libstdc++-v3/include/std/istream +++ b/libstdc++-v3/include/std/istream @@ -1,6 +1,6 @@ -// -*- C++ -*- std header. +// Input streams -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// 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 @@ -27,11 +27,273 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file istream - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +// +// 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 -#include +#define _CPP_ISTREAM 1 + +#pragma GCC system_header + +#include +#include // For numeric_limits + +namespace std +{ + // 27.6.1.1 Template class basic_istream + template + 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 + 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 + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); + + template + basic_istream& + operator>>(basic_istream& __in, unsigned char& __c) + { return (__in >> reinterpret_cast(__c)); } + + template + basic_istream& + operator>>(basic_istream& __in, signed char& __c) + { return (__in >> reinterpret_cast(__c)); } + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); + + template + basic_istream& + operator>>(basic_istream& __in, unsigned char* __s) + { return (__in >> reinterpret_cast(__s)); } + + template + basic_istream& + operator>>(basic_istream& __in, signed char* __s) + { return (__in >> reinterpret_cast(__s)); } + + // 27.6.1.5 Template class basic_iostream + template + 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 + 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 +#endif +#endif + +#endif /* _CPP_ISTREAM */ diff --git a/libstdc++-v3/include/std/iterator b/libstdc++-v3/include/std/iterator index 6e42f56..f0eee11 100644 --- a/libstdc++-v3/include/std/iterator +++ b/libstdc++-v3/include/std/iterator @@ -1,4 +1,4 @@ -// -*- C++ -*- std header. +// -*- C++ -*- // Copyright (C) 2001 Free Software Foundation, Inc. // @@ -27,11 +27,53 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file iterator - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +/* + * + * 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 -#include -#endif +#define _CPP_ITERATOR 1 + +#pragma GCC system_header +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* _CPP_ITERATOR */ + +// Local Variables: +// mode:C++ +// End: diff --git a/libstdc++-v3/include/std/limits b/libstdc++-v3/include/std/limits index ea55c7f..7a64636 100644 --- a/libstdc++-v3/include/std/limits +++ b/libstdc++-v3/include/std/limits @@ -1,6 +1,6 @@ -// -*- C++ -*- std header. +// The template and inlines for the -*- C++ -*- numeric_limits classes. -// Copyright (C) 2001 Free Software Foundation, Inc. +// 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 @@ -27,11 +27,1991 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file limits - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +// Note: this is not a conforming implementation. +// Written by Gabriel Dos Reis + +// +// 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_LIMITS -#include +#ifndef _CPP_NUMERIC_LIMITS +#define _CPP_NUMERIC_LIMITS 1 + +#pragma GCC system_header + +#include +#include + +// +// 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 + 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 + const bool + numeric_limits<_Tp>::is_specialized; + + template + const int + numeric_limits<_Tp>::digits; + + template + const int + numeric_limits<_Tp>::digits10; + + template + const bool + numeric_limits<_Tp>::is_signed; + + template + const bool + numeric_limits<_Tp>::is_integer; + + template + const bool + numeric_limits<_Tp>::is_exact; + + template + const int + numeric_limits<_Tp>::radix; + + template + const int + numeric_limits<_Tp>::min_exponent; + + template + const int + numeric_limits<_Tp>::min_exponent10; + + template + const int + numeric_limits<_Tp>::max_exponent; + + template + const int + numeric_limits<_Tp>::max_exponent10; + + template + const bool + numeric_limits<_Tp>::has_infinity; + + template + const bool + numeric_limits<_Tp>::has_quiet_NaN; + + template + const bool + numeric_limits<_Tp>::has_signaling_NaN; + + template + const float_denorm_style + numeric_limits<_Tp>::has_denorm; + + template + const bool + numeric_limits<_Tp>::has_denorm_loss; + + template + const bool + numeric_limits<_Tp>::is_iec559; + + template + const bool + numeric_limits<_Tp>::is_bounded; + + template + const bool + numeric_limits<_Tp>::is_modulo; + + template + const bool + numeric_limits<_Tp>::traps; + + template + const bool + numeric_limits<_Tp>::tinyness_before; + + template + 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 + { + 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 + { + 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(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 + { + 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(0); } + static signed char quiet_NaN() throw() + { return static_cast(0); } + static signed char signaling_NaN() throw() + { return static_cast(0); } + static signed char denorm_min() throw() + { return static_cast(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 + { + 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(0); } + static unsigned char quiet_NaN() throw() + { return static_cast(0); } + static unsigned char signaling_NaN() throw() + { return static_cast(0); } + static unsigned char denorm_min() throw() + { return static_cast(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 + { + 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 + { + 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 + { + 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(0); } + static unsigned short quiet_NaN() throw() + { return static_cast(0); } + static unsigned short signaling_NaN() throw() + { return static_cast(0); } + static unsigned short denorm_min() throw() + { return static_cast(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 + { + 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(0); } + static int quiet_NaN() throw() + { return static_cast(0); } + static int signaling_NaN() throw() + { return static_cast(0); } + static int denorm_min() throw() + { return static_cast(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 + { + 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(0); } + static unsigned int quiet_NaN() throw() + { return static_cast(0); } + static unsigned int signaling_NaN() throw() + { return static_cast(0); } + static unsigned int denorm_min() throw() + { return static_cast(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 + { + 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(0); } + static long quiet_NaN() throw() + { return static_cast(0); } + static long signaling_NaN() throw() + { return static_cast(0); } + static long denorm_min() throw() + { return static_cast(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 + { + 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(0); } + static unsigned long quiet_NaN() throw() + { return static_cast(0); } + static unsigned long signaling_NaN() throw() + { return static_cast(0); } + static unsigned long denorm_min() throw() + { return static_cast(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 + { + 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(0); } + static long long quiet_NaN() throw() + { return static_cast(0); } + static long long signaling_NaN() throw() + { return static_cast(0); } + static long long denorm_min() throw() + { return static_cast(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 + { + 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(0); } + static unsigned long long quiet_NaN() throw() + { return static_cast(0); } + static unsigned long long signaling_NaN() throw() + { return static_cast(0); } + static unsigned long long denorm_min() throw() + { return static_cast(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 + { + 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 + { + 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 + { + 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 index 51490ee..683e0a7 100644 --- a/libstdc++-v3/include/std/list +++ b/libstdc++-v3/include/std/list @@ -1,4 +1,4 @@ -// -*- C++ -*- std header. +// -*- C++ -*- // Copyright (C) 2001 Free Software Foundation, Inc. // @@ -27,11 +27,51 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file list - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +/* + * + * 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 -#include -#endif +#define _CPP_LIST 1 + +#pragma GCC system_header + +#include +#include +#include +#include +#include +#include + +#endif /* _CPP_LIST */ + +// Local Variables: +// mode:C++ +// End: diff --git a/libstdc++-v3/include/std/locale b/libstdc++-v3/include/std/locale index 5a1d622..82089d0 100644 --- a/libstdc++-v3/include/std/locale +++ b/libstdc++-v3/include/std/locale @@ -1,6 +1,6 @@ -// -*- C++ -*- std header. +// Locale support -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// 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 @@ -27,11 +27,26 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file locale - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +// +// 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 -#include +#define _CPP_LOCALE 1 + +#pragma GCC system_header + +#include +#include +#include + #endif + +// Local Variables: +// mode:c++ +// End: diff --git a/libstdc++-v3/include/std/map b/libstdc++-v3/include/std/map index 3d10673..0dd38bf 100644 --- a/libstdc++-v3/include/std/map +++ b/libstdc++-v3/include/std/map @@ -1,4 +1,4 @@ -// -*- C++ -*- std header. +// -*- C++ -*- // Copyright (C) 2001 Free Software Foundation, Inc. // @@ -27,11 +27,48 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file map - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +/* + * + * 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 -#include -#endif +#define _CPP_MAP 1 + +#pragma GCC system_header + +#include +#include +#include + +#endif /* _CPP_MAP */ + +// Local Variables: +// mode:C++ +// End: diff --git a/libstdc++-v3/include/std/memory b/libstdc++-v3/include/std/memory index a52f492..c9a2e59 100644 --- a/libstdc++-v3/include/std/memory +++ b/libstdc++-v3/include/std/memory @@ -1,4 +1,4 @@ -// -*- C++ -*- std header. +// -*- C++ -*- // Copyright (C) 2001 Free Software Foundation, Inc. // @@ -27,11 +27,123 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file memory - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +/* + * 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 -#include -#endif +#define _CPP_MEMORY 1 + +#pragma GCC system_header + +#include +#include +#include +#include //for iterator_traits +#include +#include +#include + +namespace std +{ + + template 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 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 auto_ptr(auto_ptr<_Tp1>& __a) throw() + : _M_ptr(__a.release()) {} + + auto_ptr& operator=(auto_ptr& __a) throw() { + reset(__a.release()); + return *this; + } + + template + 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 operator auto_ptr_ref<_Tp1>() throw() + { return auto_ptr_ref<_Tp>(this->release()); } + template 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 index 0d2aea0..e7a6adc 100644 --- a/libstdc++-v3/include/std/numeric +++ b/libstdc++-v3/include/std/numeric @@ -1,4 +1,4 @@ -// -*- C++ -*- std header. +// -*- C++ -*- // Copyright (C) 2001 Free Software Foundation, Inc. // @@ -27,11 +27,49 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file numeric - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +/* + * + * 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 -#include -#endif +#define _CPP_NUMERIC 1 + +#pragma GCC system_header +#include +#include +#include +#include +#include + +#endif /* _CPP_NUMERIC */ + +// Local Variables: +// mode:C++ +// End: diff --git a/libstdc++-v3/include/std/ostream b/libstdc++-v3/include/std/ostream index eb4fd68..e3ec326 100644 --- a/libstdc++-v3/include/std/ostream +++ b/libstdc++-v3/include/std/ostream @@ -1,6 +1,6 @@ -// -*- C++ -*- std header. +// Output streams -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// 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 @@ -27,11 +27,262 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file ostream - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +// +// 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 -#include +#define _CPP_OSTREAM 1 + +#pragma GCC system_header + +#include + +namespace std +{ + // 27.6.2.1 Template class basic_ostream + template + 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 + (static_cast(__n))); + else + return this->operator<<(static_cast(__n)); + } + + __ostream_type& + operator<<(unsigned short __n) + { return this->operator<<(static_cast(__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 + (static_cast(__n))); + else + return this->operator<<(static_cast(__n)); + } + + __ostream_type& + operator<<(unsigned int __n) + { return this->operator<<(static_cast(__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(__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 + 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 + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c); + + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) + { return (__out << __out.widen(__c)); } + + // Specialization + template + basic_ostream& + operator<<(basic_ostream& __out, char __c); + + // Signed and unsigned + template + basic_ostream& + operator<<(basic_ostream& __out, signed char __c) + { return (__out << static_cast(__c)); } + + template + basic_ostream& + operator<<(basic_ostream& __out, unsigned char __c) + { return (__out << static_cast(__c)); } + + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s); + + template + basic_ostream<_CharT, _Traits> & + operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); + + // Partial specializationss + template + basic_ostream& + operator<<(basic_ostream& __out, const char* __s); + + // Signed and unsigned + template + basic_ostream& + operator<<(basic_ostream& __out, const signed char* __s) + { return (__out << reinterpret_cast(__s)); } + + template + basic_ostream & + operator<<(basic_ostream& __out, const unsigned char* __s) + { return (__out << reinterpret_cast(__s)); } + + // 27.6.2.7 Standard basic_ostream manipulators + template + basic_ostream<_CharT, _Traits>& + endl(basic_ostream<_CharT, _Traits>& __os) + { return flush(__os.put(__os.widen('\n'))); } + + template + basic_ostream<_CharT, _Traits>& + ends(basic_ostream<_CharT, _Traits>& __os) + { return __os.put(_CharT()); } + + template + 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 +#endif +#endif + +#endif /* _CPP_OSTREAM */ + diff --git a/libstdc++-v3/include/std/queue b/libstdc++-v3/include/std/queue index b3d9cdb..ecf7f4c 100644 --- a/libstdc++-v3/include/std/queue +++ b/libstdc++-v3/include/std/queue @@ -1,4 +1,4 @@ -// -*- C++ -*- std header. +// -*- C++ -*- // Copyright (C) 2001 Free Software Foundation, Inc. // @@ -27,11 +27,55 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file queue - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +/* + * + * 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 -#include -#endif +#define _CPP_QUEUE 1 + +#pragma GCC system_header +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* _CPP_QUEUE */ + +// Local Variables: +// mode:C++ +// End: diff --git a/libstdc++-v3/include/std/set b/libstdc++-v3/include/std/set index 414b04c..dab8e71 100644 --- a/libstdc++-v3/include/std/set +++ b/libstdc++-v3/include/std/set @@ -1,4 +1,4 @@ -// -*- C++ -*- std header. +// -*- C++ -*- // Copyright (C) 2001 Free Software Foundation, Inc. // @@ -27,11 +27,48 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file set - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +/* + * + * 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 -#include -#endif +#define _CPP_SET 1 + +#pragma GCC system_header + +#include +#include +#include + +#endif /* _CPP_SET */ + +// Local Variables: +// mode:C++ +// End: diff --git a/libstdc++-v3/include/std/sstream b/libstdc++-v3/include/std/sstream index 2a53e36..fb90986 100644 --- a/libstdc++-v3/include/std/sstream +++ b/libstdc++-v3/include/std/sstream @@ -1,6 +1,6 @@ -// -*- C++ -*- std header. +// String based streams -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// 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 @@ -27,11 +27,346 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file sstream - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +// +// 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 -#include +#define _CPP_SSTREAM 1 + +#pragma GCC system_header + +#include +#include + +namespace std +{ + template + 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 __streambuf_type; + typedef basic_string __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(_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 + 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 __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 + 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 __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 + 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 __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 +#endif +#endif + +#endif // _CPP_SSTREAM diff --git a/libstdc++-v3/include/std/stack b/libstdc++-v3/include/std/stack index e901f84..166f428 100644 --- a/libstdc++-v3/include/std/stack +++ b/libstdc++-v3/include/std/stack @@ -1,4 +1,4 @@ -// -*- C++ -*- std header. +// -*- C++ -*- // Copyright (C) 2001 Free Software Foundation, Inc. // @@ -27,11 +27,51 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file stack - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +/* + * + * 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 -#include -#endif +#define _CPP_STACK 1 + +#pragma GCC system_header + +#include +#include +#include +#include +#include +#include + +#endif /* _CPP_STACK */ + +// Local Variables: +// mode:C++ +// End: diff --git a/libstdc++-v3/include/std/stdexcept b/libstdc++-v3/include/std/stdexcept index 03e89e8..66bac50 100644 --- a/libstdc++-v3/include/std/stdexcept +++ b/libstdc++-v3/include/std/stdexcept @@ -1,4 +1,4 @@ -// -*- C++ -*- std header. +// Standard exception classes -*- C++ -*- // Copyright (C) 2001 Free Software Foundation, Inc. // @@ -27,11 +27,124 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file stdexcept - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +// +// 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 -#include -#endif +#define _CPP_STDEXCEPT 1 + +#pragma GCC system_header + +#include +#include + +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 index c0f4dd7..59f7070 100644 --- a/libstdc++-v3/include/std/streambuf +++ b/libstdc++-v3/include/std/streambuf @@ -1,6 +1,6 @@ -// -*- C++ -*- std header. +// Stream buffer classes -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// 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 @@ -27,11 +27,514 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file streambuf - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +// +// 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 -#include +#define _CPP_STREAMBUF 1 + +#pragma GCC system_header + +#include +#include +#include // For SEEK_SET, SEEK_CUR, SEEK_END +#include +#include + +namespace std +{ + template + 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 + 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 __ctype_type; + typedef basic_streambuf __streambuf_type; + + friend class basic_ios; + friend class basic_istream; + friend class basic_ostream; + friend class istreambuf_iterator; + friend class ostreambuf_iterator; + + friend streamsize + __copy_streambufs<>(basic_ios& __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(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* + 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 +#endif +#endif + +#endif /* _CPP_STREAMBUF */ + diff --git a/libstdc++-v3/include/std/string b/libstdc++-v3/include/std/string index 0229afd..9cdc533 100644 --- a/libstdc++-v3/include/std/string +++ b/libstdc++-v3/include/std/string @@ -1,6 +1,6 @@ -// -*- C++ -*- std header. +// Components for manipulating sequences of characters -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// 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 @@ -27,11 +27,34 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file string - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +// +// 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 -#include +#define _CPP_STRING 1 + +#pragma GCC system_header + +#include +#include +#include +#include // For allocator. +#include +#include // For operators >>, <<, and getline decls. +#include +#include // For less +#include + +#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT +# include // for find_if +# include #endif + +#endif /* _CPP_STRING */ + diff --git a/libstdc++-v3/include/std/utility b/libstdc++-v3/include/std/utility index 28822fa..5917c83 100644 --- a/libstdc++-v3/include/std/utility +++ b/libstdc++-v3/include/std/utility @@ -1,4 +1,4 @@ -// -*- C++ -*- std header. +// -*- C++ -*- // Copyright (C) 2001 Free Software Foundation, Inc. // @@ -27,11 +27,47 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file utility - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +/* + * + * 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 -#include -#endif +#define _CPP_UTILITY 1 + +#pragma GCC system_header +#include +#include +#include + +#endif /* _CPP_UTILITY */ + +// Local Variables: +// mode:C++ +// End: diff --git a/libstdc++-v3/include/std/valarray b/libstdc++-v3/include/std/valarray index e20b7b8..a354708 100644 --- a/libstdc++-v3/include/std/valarray +++ b/libstdc++-v3/include/std/valarray @@ -1,6 +1,6 @@ -// -*- C++ -*- std header. +// The template and inlines for the -*- C++ -*- valarray class. -// Copyright (C) 2001 Free Software Foundation, Inc. +// 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 @@ -27,11 +27,716 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file valarray - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +// Written by Gabriel Dos Reis + +/** @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 -#include -#endif +#define _CPP_VALARRAY 1 + +#pragma GCC system_header + +#include +#include +#include +#include +#include +#include +#include + +namespace std +{ + template class _Expr; + + template class _ValArray; + + template class _Oper, + template class _Meta, class _Dom> struct _UnClos; + + template class _Oper, + template class _Meta1, + template class _Meta2, + class _Dom1, class _Dom2> class _BinClos; + + template class _Meta, class _Dom> class _SClos; + + template class _Meta, class _Dom> class _GClos; + + template class _Meta, class _Dom> class _IClos; + + template class _Meta, class _Dom> class _ValFunClos; + + template class _Meta, class _Dom> class _RefFunClos; + + template struct _Unary_plus; + template struct _Bitwise_and; + template struct _Bitwise_or; + template struct _Bitwise_xor; + template struct _Bitwise_not; + template struct _Shift_left; + template struct _Shift_right; + + template class valarray; // An array of type _Tp + class slice; // BLAS-like slice out of an array + template class slice_array; + class gslice; // generalized slice out of an array + template class gslice_array; + template class mask_array; // masked array + template class indirect_array; // indirected array + +} // namespace std + +#include +#include + +namespace std +{ + template 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 + 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 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&) const; + mask_array<_Tp> operator[](const valarray&); + _Expr<_IClos<_ValArray, _Tp>, _Tp> + operator[](const valarray&) const; + indirect_array<_Tp> operator[](const valarray&); + + // _lib.valarray.unary_ unary operators: + _Expr<_UnClos<_Unary_plus,_ValArray,_Tp>,_Tp> operator+ () const; + _Expr<_UnClos,_Tp> operator- () const; + _Expr<_UnClos<_Bitwise_not,_ValArray,_Tp>,_Tp> operator~ () const; + _Expr<_UnClos,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 + valarray<_Tp>& operator*= (const _Expr<_Dom,_Tp>&); + template + valarray<_Tp>& operator/= (const _Expr<_Dom,_Tp>&); + template + valarray<_Tp>& operator%= (const _Expr<_Dom,_Tp>&); + template + valarray<_Tp>& operator+= (const _Expr<_Dom,_Tp>&); + template + valarray<_Tp>& operator-= (const _Expr<_Dom,_Tp>&); + template + valarray<_Tp>& operator^= (const _Expr<_Dom,_Tp>&); + template + valarray<_Tp>& operator|= (const _Expr<_Dom,_Tp>&); + template + valarray<_Tp>& operator&= (const _Expr<_Dom,_Tp>&); + template + valarray<_Tp>& operator<<=(const _Expr<_Dom,_Tp>&); + template + 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 struct _Unary_plus : unary_function<_Tp,_Tp> { + _Tp operator() (const _Tp& __t) const { return __t; } + }; + + template struct _Bitwise_and : binary_function<_Tp,_Tp,_Tp> { + _Tp operator() (_Tp __x, _Tp __y) const { return __x & __y; } + }; + + template struct _Bitwise_or : binary_function<_Tp,_Tp,_Tp> { + _Tp operator() (_Tp __x, _Tp __y) const { return __x | __y; } + }; + + template struct _Bitwise_xor : binary_function<_Tp,_Tp,_Tp> { + _Tp operator() (_Tp __x, _Tp __y) const { return __x ^ __y; } + }; + + template struct _Bitwise_not : unary_function<_Tp,_Tp> { + _Tp operator() (_Tp __t) const { return ~__t; } + }; + + template struct _Shift_left : unary_function<_Tp,_Tp> { + _Tp operator() (_Tp __x, _Tp __y) const { return __x << __y; } + }; + + template struct _Shift_right : unary_function<_Tp,_Tp> { + _Tp operator() (_Tp __x, _Tp __y) const { return __x >> __y; } + }; + + + template + inline const _Tp& + valarray<_Tp>::operator[] (size_t __i) const + { return _M_data[__i]; } + + template + inline _Tp& + valarray<_Tp>::operator[] (size_t __i) + { return _M_data[__i]; } + +} // std:: + +#include +#include +#include +#include +#include +#include + +namespace std +{ + template + inline valarray<_Tp>::valarray () : _M_size (0), _M_data (0) {} + + template + 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 + 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 + 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 + 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 + 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 + 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(__ga._M_index), + _Array<_Tp>(_M_data), _M_size); + } + + template + 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 + 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 template + 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 + inline valarray<_Tp>::~valarray () + { + __valarray_destroy_elements(_M_data, _M_data + _M_size); + __valarray_release_memory(_M_data); + } + + template + inline valarray<_Tp>& + valarray<_Tp>::operator= (const valarray<_Tp>& __v) + { + __valarray_copy(__v._M_data, _M_size, _M_data); + return *this; + } + + template + inline valarray<_Tp>& + valarray<_Tp>::operator= (const _Tp& __t) + { + __valarray_fill (_M_data, _M_size, __t); + return *this; + } + + template + 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 + inline valarray<_Tp>& + valarray<_Tp>::operator= (const gslice_array<_Tp>& __ga) + { + __valarray_copy (__ga._M_array, _Array(__ga._M_index), + _Array<_Tp>(_M_data), _M_size); + return *this; + } + + template + 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 + 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 template + inline valarray<_Tp>& + valarray<_Tp>::operator= (const _Expr<_Dom, _Tp>& __e) + { + __valarray_copy (__e, _M_size, _Array<_Tp>(_M_data)); + return *this; + } + + template + 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 + inline slice_array<_Tp> + valarray<_Tp>::operator[] (slice __s) + { + return slice_array<_Tp> (_Array<_Tp>(_M_data), __s); + } + + template + 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 + inline gslice_array<_Tp> + valarray<_Tp>::operator[] (const gslice& __gs) + { + return gslice_array<_Tp> + (_Array<_Tp>(_M_data), __gs._M_index->_M_index); + } + + template + inline valarray<_Tp> + valarray<_Tp>::operator[] (const valarray& __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 (__m))); + } + + template + inline mask_array<_Tp> + valarray<_Tp>::operator[] (const valarray& __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 (__m)); + } + + template + inline _Expr<_IClos<_ValArray,_Tp>, _Tp> + valarray<_Tp>::operator[] (const valarray& __i) const + { + typedef _IClos<_ValArray,_Tp> _Closure; + return _Expr<_Closure, _Tp> (_Closure (*this, __i)); + } + + template + inline indirect_array<_Tp> + valarray<_Tp>::operator[] (const valarray& __i) + { + return indirect_array<_Tp> (_Array<_Tp>(_M_data), __i.size(), + _Array (__i)); + } + + template + inline size_t valarray<_Tp>::size () const { return _M_size; } + + template + inline _Tp + valarray<_Tp>::sum () const + { + return __valarray_sum(_M_data, _M_data + _M_size); + } + +// template +// inline _Tp +// valarray<_Tp>::product () const +// { +// return __valarray_product(_M_data, _M_data + _M_size); +// } + + template + 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 + 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 + inline void + valarray<_Tp>::resize (size_t __n, _Tp __c) + { + // This complication is so to make valarray > work + // even though it is not required by the standard. Nobody should + // be saying valarray > 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 + inline _Tp + valarray<_Tp>::min() const + { + return *min_element (_M_data, _M_data+_M_size); + } + + template + inline _Tp + valarray<_Tp>::max() const + { + return *max_element (_M_data, _M_data+_M_size); + } + + template + 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 + 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 \ + 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 + inline _Expr<_UnClos, bool> + valarray<_Tp>::operator!() const + { + typedef _UnClos _Closure; + return _Expr<_Closure, bool> (_Closure (*this)); + } + +#define _DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(_Op, _Name) \ + template \ + inline valarray<_Tp> & \ + valarray<_Tp>::operator _Op##= (const _Tp &__t) \ + { \ + _Array_augmented_##_Name (_Array<_Tp>(_M_data), _M_size, __t); \ + return *this; \ + } \ + \ + template \ + 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 template \ + 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 \ + 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 \ + 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 \ + 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 \ + 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 \ + 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 \ + 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 index 8fa361d..995daec 100644 --- a/libstdc++-v3/include/std/vector +++ b/libstdc++-v3/include/std/vector @@ -1,4 +1,4 @@ -// -*- C++ -*- std header. +// -*- C++ -*- // Copyright (C) 2001 Free Software Foundation, Inc. // @@ -27,11 +27,52 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file vector - * This is a Standard C++ Library file. You should @c #include this file - * in your programs, rather than any of the "st[dl]_*.h" implementation files. +/* + * + * 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 -#include -#endif +#define _CPP_VECTOR 1 + +#pragma GCC system_header + +#include +#include +#include +#include +#include +#include +#include + +#endif /* _CPP_VECTOR */ + +// Local Variables: +// mode:C++ +// End: diff --git a/libstdc++-v3/src/bitset.cc b/libstdc++-v3/src/bitset.cc index 0c3fc5f..c0bec5d 100644 --- a/libstdc++-v3/src/bitset.cc +++ b/libstdc++-v3/src/bitset.cc @@ -41,7 +41,7 @@ * purpose. It is provided "as is" without express or implied warranty. */ -#include +#include // // Definitions of non-inline functions from the single-word version of diff --git a/libstdc++-v3/src/cmath.cc b/libstdc++-v3/src/cmath.cc index 6442e0c..7a7433a 100644 --- a/libstdc++-v3/src/cmath.cc +++ b/libstdc++-v3/src/cmath.cc @@ -32,7 +32,7 @@ // helper functions used in the math routines of libstdc++. -#include +#include namespace std { @@ -45,4 +45,3 @@ namespace std __cmath_power(long double, unsigned int); } // namespace std - diff --git a/libstdc++-v3/src/codecvt.cc b/libstdc++-v3/src/codecvt.cc index 5e7cdb6..c5474c6 100644 --- a/libstdc++-v3/src/codecvt.cc +++ b/libstdc++-v3/src/codecvt.cc @@ -27,7 +27,7 @@ // Written by Benjamin Kosnik -#include +#include namespace std { diff --git a/libstdc++-v3/src/complex_io.cc b/libstdc++-v3/src/complex_io.cc index c4b8a95..a6d502f 100644 --- a/libstdc++-v3/src/complex_io.cc +++ b/libstdc++-v3/src/complex_io.cc @@ -27,7 +27,7 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -#include +#include namespace std { @@ -91,6 +91,3 @@ namespace std const complex&); #endif //_GLIBCPP_USE_WCHAR_T } // namespace std - - - diff --git a/libstdc++-v3/src/concept-inst.cc b/libstdc++-v3/src/concept-inst.cc index 28cf104..11e4a89 100644 --- a/libstdc++-v3/src/concept-inst.cc +++ b/libstdc++-v3/src/concept-inst.cc @@ -39,15 +39,14 @@ #ifdef _GLIBCPP_CONCEPT_CHECKS -#include -#include -#include +#include +#include +#include #define _Instantiate(...) template void __function_requires< __VA_ARGS__ > () namespace __gnu_cxx { - template void __aux_require_boolean_expr(bool const&); _Instantiate(_BidirectionalIteratorConcept< @@ -160,5 +159,3 @@ namespace __gnu_cxx #undef _Instantiate #endif - - diff --git a/libstdc++-v3/src/ios.cc b/libstdc++-v3/src/ios.cc index 90379fb..6ca5957 100644 --- a/libstdc++-v3/src/ios.cc +++ b/libstdc++-v3/src/ios.cc @@ -31,10 +31,10 @@ // ISO C++ 14882: 27.4 Iostreams base classes // -#include -#include -#include -#include +#include +#include +#include +#include namespace std { diff --git a/libstdc++-v3/src/limits.cc b/libstdc++-v3/src/limits.cc index cf3ddae..3fc3dcb 100644 --- a/libstdc++-v3/src/limits.cc +++ b/libstdc++-v3/src/limits.cc @@ -34,7 +34,7 @@ // 18.2.1 // -#include +#include namespace std { diff --git a/libstdc++-v3/src/locale-inst.cc b/libstdc++-v3/src/locale-inst.cc index 2cbd506..e2f6d77 100644 --- a/libstdc++-v3/src/locale-inst.cc +++ b/libstdc++-v3/src/locale-inst.cc @@ -31,17 +31,16 @@ // ISO C++ 14882: 22.1 Locales // -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include namespace std { diff --git a/libstdc++-v3/src/locale.cc b/libstdc++-v3/src/locale.cc index 13c85ab..630805e 100644 --- a/libstdc++-v3/src/locale.cc +++ b/libstdc++-v3/src/locale.cc @@ -25,20 +25,20 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include // for auto_ptr +#include +#include +#include +#include +#include +#include // for auto_ptr #ifdef _GLIBCPP_USE_WCHAR_T -# include // for towupper, etc. +# include // for towupper, etc. #endif namespace std diff --git a/libstdc++-v3/src/localename.cc b/libstdc++-v3/src/localename.cc index 8c2db9d..45c4732 100644 --- a/libstdc++-v3/src/localename.cc +++ b/libstdc++-v3/src/localename.cc @@ -25,11 +25,11 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include namespace std { diff --git a/libstdc++-v3/src/misc-inst.cc b/libstdc++-v3/src/misc-inst.cc index ab2f2aa..bb0bd78 100644 --- a/libstdc++-v3/src/misc-inst.cc +++ b/libstdc++-v3/src/misc-inst.cc @@ -31,20 +31,18 @@ // ISO C++ 14882: // -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // NB: unnecessary if the .h headers include these #ifndef _GLIBCPP_FULLY_COMPLIANT_HEADERS diff --git a/libstdc++-v3/src/stdexcept.cc b/libstdc++-v3/src/stdexcept.cc index 32ebd26..d39d41f 100644 --- a/libstdc++-v3/src/stdexcept.cc +++ b/libstdc++-v3/src/stdexcept.cc @@ -31,8 +31,8 @@ // ISO C++ 14882: 19.1 Exception classes // -#include -#include +#include +#include namespace std { diff --git a/libstdc++-v3/src/stl-inst.cc b/libstdc++-v3/src/stl-inst.cc index bc12464..52661df 100644 --- a/libstdc++-v3/src/stl-inst.cc +++ b/libstdc++-v3/src/stl-inst.cc @@ -32,13 +32,12 @@ // #include -#include -#include -#include +#include +#include +#include namespace std { - template class __malloc_alloc_template<0>; #ifndef __USE_MALLOC @@ -51,4 +50,3 @@ namespace std _M_insert_aux(vector::iterator, unsigned int const &); } // namespace std - diff --git a/libstdc++-v3/src/string-inst.cc b/libstdc++-v3/src/string-inst.cc index 324ca86..4da060f 100644 --- a/libstdc++-v3/src/string-inst.cc +++ b/libstdc++-v3/src/string-inst.cc @@ -33,7 +33,7 @@ // Written by Jason Merrill based upon the specification by Takanori Adachi // in ANSI X3J16/94-0013R2. Rewritten by Nathan Myers. -#include +#include // Instantiation configuration. #ifndef C diff --git a/libstdc++-v3/src/valarray-inst.cc b/libstdc++-v3/src/valarray-inst.cc index c5f5616..b56a911 100644 --- a/libstdc++-v3/src/valarray-inst.cc +++ b/libstdc++-v3/src/valarray-inst.cc @@ -31,7 +31,7 @@ // ISO C++ 14882: // -#include +#include namespace std { -- cgit v1.1