From: Benjamin Kosnik Date: Sat, 31 Mar 2001 20:15:43 +0000 (+0000) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b7e0d00051303e937b2f9d2d5452d29b16956c5;p=gcc.git [multiple changes] 2001-03-31 Benjamin Kosnik * configure.target: Remove duplicate aix entry. 2001-03-30 Benjamin Kosnik * include/ext/stl_bvector.h: Move to... * include/bits/stl_vector.h: ...here. * include/ext/bvector: Move to... * include/backward/bvector.h: ...here. * include/bits/std_vector.h: Change stl_bvector include. * include/bits/std_queue.h: Remove bvector include. * include/ext/tree: Insert using rb_tree, move to... * include/backward/tree.h: ...here. * include/backward/hash_map.h: Include ext/hash_map. * include/backward/hash_set.h: Include ext/hash_set. * include/backward/queue.h: New file. * include/backward/stack.h: Edit. * include/backward/algo.h: Same. * include/backward/algobase.h: Same. * include/backward/alloc.h: Same. * include/backward/function.h: Same. * include/backward/iomanip.h: Same. * include/backward/istream.h: Same. * include/backward/iterator.h: Same. * include/backward/list.h: Same. * include/backward/map.h: Same. * include/backward/multimap.h: Same. * include/backward/multiset.h: Same. * include/backward/ostream.h: Same. * include/backward/pair.h: Same * include/backward/rope.h: Same. * include/backward/set.h: Same. * include/backward/stream.h: Same. * include/backward/strstream.h: Same. * include/backward/tempbuf.h: Same. * src/Makefile.am (ext_headers): Edit. * src/Makefile.in: Regenerate. * testsuite/ext/headers.cc (main): Fix. * mkcheck.in: Fix. From-SVN: r40979 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index db4b21f058c..395ef5bbb12 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,44 @@ +2001-03-31 Benjamin Kosnik + + * configure.target: Remove duplicate aix entry. + +2001-03-30 Benjamin Kosnik + + * include/ext/stl_bvector.h: Move to... + * include/bits/stl_vector.h: ...here. + * include/ext/bvector: Move to... + * include/backward/bvector.h: ...here. + * include/bits/std_vector.h: Change stl_bvector include. + * include/bits/std_queue.h: Remove bvector include. + * include/ext/tree: Insert using rb_tree, move to... + * include/backward/tree.h: ...here. + * include/backward/hash_map.h: Include ext/hash_map. + * include/backward/hash_set.h: Include ext/hash_set. + * include/backward/queue.h: New file. + * include/backward/stack.h: Edit. + * include/backward/algo.h: Same. + * include/backward/algobase.h: Same. + * include/backward/alloc.h: Same. + * include/backward/function.h: Same. + * include/backward/iomanip.h: Same. + * include/backward/istream.h: Same. + * include/backward/iterator.h: Same. + * include/backward/list.h: Same. + * include/backward/map.h: Same. + * include/backward/multimap.h: Same. + * include/backward/multiset.h: Same. + * include/backward/ostream.h: Same. + * include/backward/pair.h: Same + * include/backward/rope.h: Same. + * include/backward/set.h: Same. + * include/backward/stream.h: Same. + * include/backward/strstream.h: Same. + * include/backward/tempbuf.h: Same. + * src/Makefile.am (ext_headers): Edit. + * src/Makefile.in: Regenerate. + * testsuite/ext/headers.cc (main): Fix. + * mkcheck.in: Fix. + 2001-03-30 Phil Edwards * tests_flags.in (LIBS): Pass correct path for installed testing. diff --git a/libstdc++-v3/configure.target b/libstdc++-v3/configure.target index 1da593fc529..0fda72d1000 100644 --- a/libstdc++-v3/configure.target +++ b/libstdc++-v3/configure.target @@ -69,9 +69,6 @@ case "${target_os}" in ;; esac ;; - aix*) - os_include_dir="config/os/aix" - ;; bsd* | freebsd* ) os_include_dir="config/os/bsd/freebsd" ;; diff --git a/libstdc++-v3/include/backward/algo.h b/libstdc++-v3/include/backward/algo.h index f93a8032393..f580dcf22dc 100644 --- a/libstdc++-v3/include/backward/algo.h +++ b/libstdc++-v3/include/backward/algo.h @@ -29,6 +29,7 @@ #include "algobase.h" #include "tempbuf.h" +#include "iterator.h" #include #include diff --git a/libstdc++-v3/include/backward/algobase.h b/libstdc++-v3/include/backward/algobase.h index 88e857ea314..b9189559e3b 100644 --- a/libstdc++-v3/include/backward/algobase.h +++ b/libstdc++-v3/include/backward/algobase.h @@ -26,18 +26,10 @@ #ifndef _CPP_BACKWARD_ALGOBASE_H #define _CPP_BACKWARD_ALGOBASE_H 1 -#ifndef _CPP_BACKWARD_PAIR_H #include "pair.h" -#endif -#ifndef _CPP_BACKWARD_ITERATOR_H #include "iterator.h" -#endif -#ifndef _CPP_BITS_STL__ALGOBASE_H #include -#endif -#ifndef _CPP_BITS_STL_UNINITIALIZED_H #include -#endif // Names from stl_algobase.h using std::iter_swap; diff --git a/libstdc++-v3/include/backward/alloc.h b/libstdc++-v3/include/backward/alloc.h index a90f41fe5f3..3997d14ab15 100644 --- a/libstdc++-v3/include/backward/alloc.h +++ b/libstdc++-v3/include/backward/alloc.h @@ -15,9 +15,7 @@ #define _CPP_BACKWARD_ALLOC_H 1 #include -#ifndef _CPP_BITS_STL_ALLOC_H #include -#endif using std::__malloc_alloc_template; using std::malloc_alloc; diff --git a/libstdc++-v3/include/backward/bvector.h b/libstdc++-v3/include/backward/bvector.h index 0c08cd6a5ec..48a713ff396 100644 --- a/libstdc++-v3/include/backward/bvector.h +++ b/libstdc++-v3/include/backward/bvector.h @@ -24,16 +24,15 @@ * purpose. It is provided "as is" without express or implied warranty. */ -#ifndef _CPP_BACKWARD_BVECTOR_H -#define _CPP_BACKWARD_BVECTOR_H 1 +#ifndef __SGI_STL_BVECTOR_H +#define __SGI_STL_BVECTOR_H -#include "vector.h" -#include +#include using std::bit_vector; -#endif /* _CPP_BACKWARD_BVECTOR_H */ +#endif /* __SGI_STL_BVECTOR_H */ // Local Variables: // mode:C++ diff --git a/libstdc++-v3/include/backward/function.h b/libstdc++-v3/include/backward/function.h index d4f4489b446..747135eac61 100644 --- a/libstdc++-v3/include/backward/function.h +++ b/libstdc++-v3/include/backward/function.h @@ -29,9 +29,7 @@ #include #include -#ifndef _CPP_BITS_STL_FUNCTION_H #include -#endif // Names from stl_function.h using std::unary_function; diff --git a/libstdc++-v3/include/backward/hash_map.h b/libstdc++-v3/include/backward/hash_map.h index 29ba8d5d100..fd8d823cb00 100644 --- a/libstdc++-v3/include/backward/hash_map.h +++ b/libstdc++-v3/include/backward/hash_map.h @@ -27,12 +27,8 @@ #ifndef _CPP_BACKWARD_HASH_MAP_H #define _CPP_BACKWARD_HASH_MAP_H 1 -#ifndef _CPP_BITS_STL_HASHTABLE_H -#include -#endif - #include "algobase.h" -#include +#include using std::hash; using std::hashtable; diff --git a/libstdc++-v3/include/backward/hash_set.h b/libstdc++-v3/include/backward/hash_set.h index 728d7c0d851..9458910a5f9 100644 --- a/libstdc++-v3/include/backward/hash_set.h +++ b/libstdc++-v3/include/backward/hash_set.h @@ -27,12 +27,8 @@ #ifndef _CPP_BACKWARD_HASH_SET_H #define _CPP_BACKWARD_HASH_SET_H 1 -#ifndef _CPP_BITS_STL_HASHTABLE_H -#include -#endif - #include "algobase.h" -#include +#include using std::hash; using std::hashtable; @@ -40,3 +36,4 @@ using std::hash_set; using std::hash_multiset; #endif /* _CPP_BACKWARD_HASH_SET_H */ + diff --git a/libstdc++-v3/include/backward/iomanip.h b/libstdc++-v3/include/backward/iomanip.h index 3f990451940..10cd3ba9fe0 100644 --- a/libstdc++-v3/include/backward/iomanip.h +++ b/libstdc++-v3/include/backward/iomanip.h @@ -28,7 +28,7 @@ #ifndef _CPP_BACKWARD_IOMANIP_H #define _CPP_BACKWARD_IOMANIP_H 1 -#include +#include "iostream.h" #include // These are from as per [27.4]. diff --git a/libstdc++-v3/include/backward/istream.h b/libstdc++-v3/include/backward/istream.h index 57ea07e95de..45344796d70 100644 --- a/libstdc++-v3/include/backward/istream.h +++ b/libstdc++-v3/include/backward/istream.h @@ -28,7 +28,7 @@ #ifndef _CPP_BACKWARD_ISTREAM_H #define _CPP_BACKWARD_ISTREAM_H 1 -#include +#include "iostream.h" #endif diff --git a/libstdc++-v3/include/backward/iterator.h b/libstdc++-v3/include/backward/iterator.h index e2b6ef58cdd..d285160ca46 100644 --- a/libstdc++-v3/include/backward/iterator.h +++ b/libstdc++-v3/include/backward/iterator.h @@ -27,26 +27,15 @@ #ifndef _CPP_BACKWARD_ITERATOR_H #define _CPP_BACKWARD_ITERATOR_H 1 -#ifndef _CPP_BACKWARD_FUNCTION_H #include "function.h" -#endif #include #include "iostream.h" -#ifndef _CPP_BITS_STL_ITERATOR_H -#include -#endif -#ifndef _CPP_BITS_TYPE_TRAITS_H -#include -#endif -#ifndef _CPP_BITS_STL_CONSTRUCT_H +#include "iterator.h" + #include -#endif -#ifndef _CPP_BITS_STL_RAW_STORAGE_ITERATOR_H #include -#endif // Names from stl_iterator.h - using std::input_iterator_tag; using std::output_iterator_tag; using std::forward_iterator_tag; diff --git a/libstdc++-v3/include/backward/list.h b/libstdc++-v3/include/backward/list.h index 22b5e7a8c1c..5870ee0ed7f 100644 --- a/libstdc++-v3/include/backward/list.h +++ b/libstdc++-v3/include/backward/list.h @@ -27,7 +27,7 @@ #ifndef _CPP_BACKWARD_LIST_H #define _CPP_BACKWARD_LIST_H 1 -#include +#include "algobase.h" #include "alloc.h" #include diff --git a/libstdc++-v3/include/backward/map.h b/libstdc++-v3/include/backward/map.h index e38a3073713..e9058c18220 100644 --- a/libstdc++-v3/include/backward/map.h +++ b/libstdc++-v3/include/backward/map.h @@ -28,7 +28,7 @@ #define _CPP_BACKWARD_MAP_H 1 #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 b6bfec22037..04db0067497 100644 --- a/libstdc++-v3/include/backward/multimap.h +++ b/libstdc++-v3/include/backward/multimap.h @@ -28,7 +28,7 @@ #define _CPP_BACKWARD_MULTIMAP_H 1 #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 f5f53abf4fa..d78e6f8059b 100644 --- a/libstdc++-v3/include/backward/multiset.h +++ b/libstdc++-v3/include/backward/multiset.h @@ -28,7 +28,7 @@ #define _CPP_BACKWARD_MULTISET_H 1 #include "tree.h" -#include +#include using std::multiset; diff --git a/libstdc++-v3/include/backward/ostream.h b/libstdc++-v3/include/backward/ostream.h index 7b4878563de..53a983c3d88 100644 --- a/libstdc++-v3/include/backward/ostream.h +++ b/libstdc++-v3/include/backward/ostream.h @@ -28,7 +28,7 @@ #ifndef _CPP_BACKWARD_OSTREAM_H #define _CPP_BACKWARD_OSTREAM_H 1 -#include +#include "iostream.h" #endif diff --git a/libstdc++-v3/include/backward/pair.h b/libstdc++-v3/include/backward/pair.h index c8f2fa3dea2..0c699587349 100644 --- a/libstdc++-v3/include/backward/pair.h +++ b/libstdc++-v3/include/backward/pair.h @@ -28,9 +28,7 @@ #define _CPP_BACKWARD_PAIR_H 1 #include -#ifndef _CPP_BITS_STL_PAIR_H #include -#endif using std::pair; using std::make_pair; diff --git a/libstdc++-v3/include/backward/queue.h b/libstdc++-v3/include/backward/queue.h new file mode 100644 index 00000000000..f6a4b1b509f --- /dev/null +++ b/libstdc++-v3/include/backward/queue.h @@ -0,0 +1,40 @@ +// 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. + +#ifndef _CPP_BACKWARD_QUEUE_H +#define _CPP_BACKWARD_QUEUE_H 1 + +#include + +using std::queue; +using std::priority_queue; + +#endif + +// Local Variables: +// mode:C++ +// End: diff --git a/libstdc++-v3/include/backward/rope.h b/libstdc++-v3/include/backward/rope.h index 8bf753dcf36..6dafb1697a6 100644 --- a/libstdc++-v3/include/backward/rope.h +++ b/libstdc++-v3/include/backward/rope.h @@ -15,7 +15,7 @@ #define _CPP_BACKWARD_ROPE_H 1 #include "hashtable.h" -#include +#include using std::char_producer; using std::sequence_buffer; diff --git a/libstdc++-v3/include/backward/set.h b/libstdc++-v3/include/backward/set.h index 4fad9154ba0..7822bea10c2 100644 --- a/libstdc++-v3/include/backward/set.h +++ b/libstdc++-v3/include/backward/set.h @@ -28,7 +28,7 @@ #define _CPP_BACKWARD_SET_H 1 #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 85387e1b0c2..a9a800aabe0 100644 --- a/libstdc++-v3/include/backward/stack.h +++ b/libstdc++-v3/include/backward/stack.h @@ -30,12 +30,10 @@ #include "vector.h" #include "deque.h" #include "heap.h" -#include -#include +#include "queue.h" +#include using std::stack; -using std::queue; -using std::priority_queue; #endif /* _CPP_BACKWARD_STACK_H */ diff --git a/libstdc++-v3/include/backward/stream.h b/libstdc++-v3/include/backward/stream.h index 15c32b821f1..b22d686fb9e 100644 --- a/libstdc++-v3/include/backward/stream.h +++ b/libstdc++-v3/include/backward/stream.h @@ -28,7 +28,7 @@ #ifndef _CPP_BACKWARD_STREAM_H #define _CPP_BACKWARD_STREAM_H 1 -#include +#include "iostream.h" #endif diff --git a/libstdc++-v3/include/backward/strstream.h b/libstdc++-v3/include/backward/strstream.h index 3918141a14b..82802d2f86a 100644 --- a/libstdc++-v3/include/backward/strstream.h +++ b/libstdc++-v3/include/backward/strstream.h @@ -30,7 +30,7 @@ #ifndef _CPP_BACKWARD_STRSTREAM_H #define _CPP_BACKWARD_STRSTREAM_H 1 -#include +#include "strstream" using std::strstreambuf; using std::istrstream; diff --git a/libstdc++-v3/include/backward/tempbuf.h b/libstdc++-v3/include/backward/tempbuf.h index b8d36d79373..425adf10cb6 100644 --- a/libstdc++-v3/include/backward/tempbuf.h +++ b/libstdc++-v3/include/backward/tempbuf.h @@ -27,29 +27,19 @@ #ifndef _CPP_BACKWARD_TEMPBUF_H #define _CPP_BACKWARD_TEMPBUF_H 1 -#ifndef _CPP_BACKWARD_PAIR_H #include "pair.h" -#endif -#include +#include "iterator.h" #include #include #include -#ifndef _CPP_BITS_TYPE_TRAITS_H #include -#endif -#ifndef _CPP_BITS_STL_CONSTRUCT_H #include -#endif -#ifndef _CPP_BITS_STL_UNINITIALIZED_H #include -#endif -#ifndef _CPP_BITS_STL_TEMPBUF_H #include -#endif using std::get_temporary_buffer; using std::return_temporary_buffer; -using std::_Temporary_buffer; +using std::temporary_buffer; #endif /* _CPP_BACKWARD_TEMPBUF_H */ diff --git a/libstdc++-v3/include/backward/tree.h b/libstdc++-v3/include/backward/tree.h index bca51de6f51..728544b62f0 100644 --- a/libstdc++-v3/include/backward/tree.h +++ b/libstdc++-v3/include/backward/tree.h @@ -1,6 +1,6 @@ + /* - * - * Copyright (c) 1996,1997 + * Copyright (c) 1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software @@ -11,34 +11,16 @@ * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * - * - * 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. - * - * */ -#ifndef _CPP_BACKWARD_TREE_H -#define _CPP_BACKWARD_TREE_H 1 +#ifndef _CPP_EXT_TREE +#define _CPP_EXT_TREE 1 -#ifndef _CPP_BITS_STL_TREE_H #include -#endif -#include "algobase.h" -#include "alloc.h" using std::rb_tree; -#endif /* _CPP_BACKWARD_TREE_H */ - +#endif // Local Variables: // mode:C++ // End: diff --git a/libstdc++-v3/include/bits/std_queue.h b/libstdc++-v3/include/bits/std_queue.h index e15a3a20e53..d7264793643 100644 --- a/libstdc++-v3/include/bits/std_queue.h +++ b/libstdc++-v3/include/bits/std_queue.h @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/libstdc++-v3/include/bits/std_vector.h b/libstdc++-v3/include/bits/std_vector.h index 6b846ad2c9e..9b5ba58774a 100644 --- a/libstdc++-v3/include/bits/std_vector.h +++ b/libstdc++-v3/include/bits/std_vector.h @@ -35,7 +35,7 @@ #include #include #include -#include +#include #endif /* _CPP_VECTOR */ diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h new file mode 100644 index 00000000000..7b768a4c3ed --- /dev/null +++ b/libstdc++-v3/include/bits/stl_bvector.h @@ -0,0 +1,698 @@ +/* + * + * 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-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. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef __SGI_STL_INTERNAL_BVECTOR_H +#define __SGI_STL_INTERNAL_BVECTOR_H + +namespace std +{ + +static const int __WORD_BIT = int(CHAR_BIT*sizeof(unsigned int)); + +struct _Bit_reference { + unsigned int* _M_p; + unsigned int _M_mask; + _Bit_reference(unsigned int* __x, unsigned int __y) + : _M_p(__x), _M_mask(__y) {} + +public: + _Bit_reference() : _M_p(0), _M_mask(0) {} + operator bool() const { return !(!(*_M_p & _M_mask)); } + _Bit_reference& operator=(bool __x) + { + if (__x) *_M_p |= _M_mask; + else *_M_p &= ~_M_mask; + return *this; + } + _Bit_reference& operator=(const _Bit_reference& __x) + { return *this = bool(__x); } + bool operator==(const _Bit_reference& __x) const + { return bool(*this) == bool(__x); } + bool operator<(const _Bit_reference& __x) const { + return !bool(*this) && bool(__x); + } + void flip() { *_M_p ^= _M_mask; } +}; + +inline void swap(_Bit_reference __x, _Bit_reference __y) +{ + bool __tmp = __x; + __x = __y; + __y = __tmp; +} + +struct _Bit_iterator_base : public random_access_iterator +{ + unsigned int* _M_p; + unsigned int _M_offset; + + _Bit_iterator_base(unsigned int* __x, unsigned int __y) + : _M_p(__x), _M_offset(__y) {} + + void _M_bump_up() { + if (_M_offset++ == __WORD_BIT - 1) { + _M_offset = 0; + ++_M_p; + } + } + void _M_bump_down() { + if (_M_offset-- == 0) { + _M_offset = __WORD_BIT - 1; + --_M_p; + } + } + + void _M_incr(ptrdiff_t __i) { + difference_type __n = __i + _M_offset; + _M_p += __n / __WORD_BIT; + __n = __n % __WORD_BIT; + if (__n < 0) { + _M_offset = (unsigned int) __n + __WORD_BIT; + --_M_p; + } else + _M_offset = (unsigned int) __n; + } + + bool operator==(const _Bit_iterator_base& __i) const { + return _M_p == __i._M_p && _M_offset == __i._M_offset; + } + bool operator<(const _Bit_iterator_base& __i) const { + return _M_p < __i._M_p || (_M_p == __i._M_p && _M_offset < __i._M_offset); + } + bool operator!=(const _Bit_iterator_base& __i) const { + return !(*this == __i); + } + bool operator>(const _Bit_iterator_base& __i) const { + return __i < *this; + } + bool operator<=(const _Bit_iterator_base& __i) const { + return !(__i < *this); + } + bool operator>=(const _Bit_iterator_base& __i) const { + return !(*this < __i); + } +}; + +inline ptrdiff_t +operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { + return __WORD_BIT * (__x._M_p - __y._M_p) + __x._M_offset - __y._M_offset; +} + + +struct _Bit_iterator : public _Bit_iterator_base +{ + typedef _Bit_reference reference; + typedef _Bit_reference* pointer; + typedef _Bit_iterator iterator; + + _Bit_iterator() : _Bit_iterator_base(0, 0) {} + _Bit_iterator(unsigned int* __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) {} + + reference operator*() const { return reference(_M_p, 1U << _M_offset); } + iterator& operator++() { + _M_bump_up(); + return *this; + } + iterator operator++(int) { + iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + iterator& operator--() { + _M_bump_down(); + return *this; + } + iterator operator--(int) { + iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + iterator& operator+=(difference_type __i) { + _M_incr(__i); + return *this; + } + iterator& operator-=(difference_type __i) { + *this += -__i; + return *this; + } + iterator operator+(difference_type __i) const { + iterator __tmp = *this; + return __tmp += __i; + } + iterator operator-(difference_type __i) const { + iterator __tmp = *this; + return __tmp -= __i; + } + + reference operator[](difference_type __i) { return *(*this + __i); } +}; + +inline _Bit_iterator +operator+(ptrdiff_t __n, const _Bit_iterator& __x) { return __x + __n; } + + +struct _Bit_const_iterator : public _Bit_iterator_base +{ + typedef bool reference; + typedef bool const_reference; + typedef const bool* pointer; + typedef _Bit_const_iterator const_iterator; + + _Bit_const_iterator() : _Bit_iterator_base(0, 0) {} + _Bit_const_iterator(unsigned int* __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) {} + _Bit_const_iterator(const _Bit_iterator& __x) + : _Bit_iterator_base(__x._M_p, __x._M_offset) {} + + const_reference operator*() const { + return _Bit_reference(_M_p, 1U << _M_offset); + } + const_iterator& operator++() { + _M_bump_up(); + return *this; + } + const_iterator operator++(int) { + const_iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + const_iterator& operator--() { + _M_bump_down(); + return *this; + } + const_iterator operator--(int) { + const_iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + const_iterator& operator+=(difference_type __i) { + _M_incr(__i); + return *this; + } + const_iterator& operator-=(difference_type __i) { + *this += -__i; + return *this; + } + const_iterator operator+(difference_type __i) const { + const_iterator __tmp = *this; + return __tmp += __i; + } + const_iterator operator-(difference_type __i) const { + const_iterator __tmp = *this; + return __tmp -= __i; + } + const_reference operator[](difference_type __i) { + return *(*this + __i); + } +}; + +inline _Bit_const_iterator +operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) { return __x + __n; } + + +// Bit-vector base class, which encapsulates the difference between +// old SGI-style allocators and standard-conforming allocators. + +// Base class for ordinary allocators. +template +class _Bvector_alloc_base { +public: + typedef typename _Alloc_traits::allocator_type + allocator_type; + allocator_type get_allocator() const { return _M_data_allocator; } + + _Bvector_alloc_base(const allocator_type& __a) + : _M_data_allocator(__a), _M_start(), _M_finish(), _M_end_of_storage(0) {} + +protected: + unsigned int* _M_bit_alloc(size_t __n) + { return _M_data_allocator.allocate((__n + __WORD_BIT - 1)/__WORD_BIT); } + void _M_deallocate() { + if (_M_start._M_p) + _M_data_allocator.deallocate(_M_start._M_p, + _M_end_of_storage - _M_start._M_p); + } + + typename _Alloc_traits::allocator_type + _M_data_allocator; + _Bit_iterator _M_start; + _Bit_iterator _M_finish; + unsigned int* _M_end_of_storage; +}; + +// Specialization for instanceless allocators. +template +class _Bvector_alloc_base<_Allocator, true> { +public: + typedef typename _Alloc_traits::allocator_type + allocator_type; + allocator_type get_allocator() const { return allocator_type(); } + + _Bvector_alloc_base(const allocator_type&) + : _M_start(), _M_finish(), _M_end_of_storage(0) {} + +protected: + typedef typename _Alloc_traits::_Alloc_type + _Alloc_type; + + unsigned int* _M_bit_alloc(size_t __n) + { return _Alloc_type::allocate((__n + __WORD_BIT - 1)/__WORD_BIT); } + void _M_deallocate() { + if (_M_start._M_p) + _Alloc_type::deallocate(_M_start._M_p, + _M_end_of_storage - _M_start._M_p); + } + + _Bit_iterator _M_start; + _Bit_iterator _M_finish; + unsigned int* _M_end_of_storage; +}; + +template +class _Bvector_base + : public _Bvector_alloc_base<_Alloc, + _Alloc_traits::_S_instanceless> +{ + typedef _Bvector_alloc_base<_Alloc, + _Alloc_traits::_S_instanceless> + _Base; +public: + typedef typename _Base::allocator_type allocator_type; + + _Bvector_base(const allocator_type& __a) : _Base(__a) {} + ~_Bvector_base() { _Base::_M_deallocate(); } +}; + +} // namespace std + +// Declare a partial specialization of vector. +#include +namespace std +{ + +template + class vector : public _Bvector_base<_Alloc> + { + public: + typedef bool value_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Bit_reference reference; + typedef bool const_reference; + typedef _Bit_reference* pointer; + typedef const bool* const_pointer; + + typedef _Bit_iterator iterator; + typedef _Bit_const_iterator const_iterator; + + typedef reverse_iterator const_reverse_iterator; + typedef reverse_iterator reverse_iterator; + + typedef typename _Bvector_base<_Alloc>::allocator_type allocator_type; + allocator_type get_allocator() const { + return _Bvector_base<_Alloc>::get_allocator(); + } + + protected: + using _Bvector_base<_Alloc>::_M_bit_alloc; + using _Bvector_base<_Alloc>::_M_deallocate; + using _Bvector_base<_Alloc>::_M_start; + using _Bvector_base<_Alloc>::_M_finish; + using _Bvector_base<_Alloc>::_M_end_of_storage; + + protected: + void _M_initialize(size_type __n) { + unsigned int* __q = _M_bit_alloc(__n); + _M_end_of_storage = __q + (__n + __WORD_BIT - 1)/__WORD_BIT; + _M_start = iterator(__q, 0); + _M_finish = _M_start + difference_type(__n); + } + void _M_insert_aux(iterator __position, bool __x) { + if (_M_finish._M_p != _M_end_of_storage) { + copy_backward(__position, _M_finish, _M_finish + 1); + *__position = __x; + ++_M_finish; + } + else { + size_type __len = size() ? 2 * size() : __WORD_BIT; + unsigned int* __q = _M_bit_alloc(__len); + iterator __i = copy(begin(), __position, iterator(__q, 0)); + *__i++ = __x; + _M_finish = copy(__position, end(), __i); + _M_deallocate(); + _M_end_of_storage = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; + _M_start = iterator(__q, 0); + } + } + + template + void _M_initialize_range(_InputIterator __first, _InputIterator __last, + input_iterator_tag) { + _M_start = iterator(); + _M_finish = iterator(); + _M_end_of_storage = 0; + for ( ; __first != __last; ++__first) + push_back(*__first); + } + + template + void _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag) { + size_type __n = 0; + distance(__first, __last, __n); + _M_initialize(__n); + copy(__first, __last, _M_start); + } + + template + void _M_insert_range(iterator __pos, + _InputIterator __first, _InputIterator __last, + input_iterator_tag) { + for ( ; __first != __last; ++__first) { + __pos = insert(__pos, *__first); + ++__pos; + } + } + + template + void _M_insert_range(iterator __position, + _ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag) { + if (__first != __last) { + size_type __n = 0; + distance(__first, __last, __n); + if (capacity() - size() >= __n) { + copy_backward(__position, end(), _M_finish + difference_type(__n)); + copy(__first, __last, __position); + _M_finish += difference_type(__n); + } + else { + size_type __len = size() + max(size(), __n); + unsigned int* __q = _M_bit_alloc(__len); + iterator __i = copy(begin(), __position, iterator(__q, 0)); + __i = copy(__first, __last, __i); + _M_finish = copy(__position, end(), __i); + _M_deallocate(); + _M_end_of_storage = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; + _M_start = iterator(__q, 0); + } + } + } + + public: + iterator begin() { return _M_start; } + const_iterator begin() const { return _M_start; } + iterator end() { return _M_finish; } + const_iterator end() const { return _M_finish; } + + reverse_iterator rbegin() { return reverse_iterator(end()); } + const_reverse_iterator rbegin() const { + return const_reverse_iterator(end()); + } + reverse_iterator rend() { return reverse_iterator(begin()); } + const_reverse_iterator rend() const { + return const_reverse_iterator(begin()); + } + + size_type size() const { return size_type(end() - begin()); } + size_type max_size() const { return size_type(-1); } + size_type capacity() const { + return size_type(const_iterator(_M_end_of_storage, 0) - begin()); + } + bool empty() const { return begin() == end(); } + + reference operator[](size_type __n) + { return *(begin() + difference_type(__n)); } + const_reference operator[](size_type __n) const + { return *(begin() + difference_type(__n)); } + + void _M_range_check(size_type __n) const { + if (__n >= this->size()) + __throw_range_error("vector"); + } + + reference at(size_type __n) + { _M_range_check(__n); return (*this)[__n]; } + const_reference at(size_type __n) const + { _M_range_check(__n); return (*this)[__n]; } + + explicit vector(const allocator_type& __a = allocator_type()) + : _Bvector_base<_Alloc>(__a) {} + + vector(size_type __n, bool __value, + const allocator_type& __a = allocator_type()) + : _Bvector_base<_Alloc>(__a) + { + _M_initialize(__n); + fill(_M_start._M_p, _M_end_of_storage, __value ? ~0 : 0); + } + + explicit vector(size_type __n) + : _Bvector_base<_Alloc>(allocator_type()) + { + _M_initialize(__n); + fill(_M_start._M_p, _M_end_of_storage, 0); + } + + vector(const vector& __x) : _Bvector_base<_Alloc>(__x.get_allocator()) { + _M_initialize(__x.size()); + copy(__x.begin(), __x.end(), _M_start); + } + + // Check whether it's an integral type. If so, it's not an iterator. + + template + void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) { + _M_initialize(__n); + fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0); + } + + template + void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) { + _M_initialize_range(__first, __last, __ITERATOR_CATEGORY(__first)); + } + + template + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Bvector_base<_Alloc>(__a) + { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + + ~vector() { } + + vector& operator=(const vector& __x) { + if (&__x == this) return *this; + if (__x.size() > capacity()) { + _M_deallocate(); + _M_initialize(__x.size()); + } + copy(__x.begin(), __x.end(), begin()); + _M_finish = begin() + difference_type(__x.size()); + return *this; + } + + // assign(), a generalized assignment member function. Two + // versions: one that takes a count, and one that takes a range. + // The range version is a member template, so we dispatch on whether + // or not the type is an integer. + + void _M_fill_assign(size_t __n, bool __x) { + if (__n > size()) { + fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0); + insert(end(), __n - size(), __x); + } + else { + erase(begin() + __n, end()); + fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0); + } + } + + void assign(size_t __n, bool __x) { _M_fill_assign(__n, __x); } + + template + void assign(_InputIterator __first, _InputIterator __last) { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + + template + void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign((size_t) __n, (bool) __val); } + + template + void _M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type) + { _M_assign_aux(__first, __last, __ITERATOR_CATEGORY(__first)); } + + template + void _M_assign_aux(_InputIterator __first, _InputIterator __last, + input_iterator_tag) { + iterator __cur = begin(); + for ( ; __first != __last && __cur != end(); ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + erase(__cur, end()); + else + insert(end(), __first, __last); + } + + template + void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag) { + size_type __len = 0; + distance(__first, __last, __len); + if (__len < size()) + erase(copy(__first, __last, begin()), end()); + else { + _ForwardIterator __mid = __first; + advance(__mid, size()); + copy(__first, __mid, begin()); + insert(end(), __mid, __last); + } + } + + void reserve(size_type __n) { + if (capacity() < __n) { + unsigned int* __q = _M_bit_alloc(__n); + _M_finish = copy(begin(), end(), iterator(__q, 0)); + _M_deallocate(); + _M_start = iterator(__q, 0); + _M_end_of_storage = __q + (__n + __WORD_BIT - 1)/__WORD_BIT; + } + } + + reference front() { return *begin(); } + const_reference front() const { return *begin(); } + reference back() { return *(end() - 1); } + const_reference back() const { return *(end() - 1); } + void push_back(bool __x) { + if (_M_finish._M_p != _M_end_of_storage) + *_M_finish++ = __x; + else + _M_insert_aux(end(), __x); + } + void swap(vector& __x) { + std::swap(_M_start, __x._M_start); + std::swap(_M_finish, __x._M_finish); + std::swap(_M_end_of_storage, __x._M_end_of_storage); + } + iterator insert(iterator __position, bool __x = bool()) { + difference_type __n = __position - begin(); + if (_M_finish._M_p != _M_end_of_storage && __position == end()) + *_M_finish++ = __x; + else + _M_insert_aux(__position, __x); + return begin() + __n; + } + + // Check whether it's an integral type. If so, it's not an iterator. + + template + void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, + __true_type) { + _M_fill_insert(__pos, __n, __x); + } + + template + void _M_insert_dispatch(iterator __pos, + _InputIterator __first, _InputIterator __last, + __false_type) { + _M_insert_range(__pos, __first, __last, __ITERATOR_CATEGORY(__first)); + } + + template + void insert(iterator __position, + _InputIterator __first, _InputIterator __last) { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_insert_dispatch(__position, __first, __last, _Integral()); + } + + void _M_fill_insert(iterator __position, size_type __n, bool __x) { + if (__n == 0) return; + if (capacity() - size() >= __n) { + copy_backward(__position, end(), _M_finish + difference_type(__n)); + fill(__position, __position + difference_type(__n), __x); + _M_finish += difference_type(__n); + } + else { + size_type __len = size() + max(size(), __n); + unsigned int* __q = _M_bit_alloc(__len); + iterator __i = copy(begin(), __position, iterator(__q, 0)); + fill_n(__i, __n, __x); + _M_finish = copy(__position, end(), __i + difference_type(__n)); + _M_deallocate(); + _M_end_of_storage = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; + _M_start = iterator(__q, 0); + } + } + + void insert(iterator __position, size_type __n, bool __x) { + _M_fill_insert(__position, __n, __x); + } + + void pop_back() { --_M_finish; } + iterator erase(iterator __position) { + if (__position + 1 != end()) + copy(__position + 1, end(), __position); + --_M_finish; + return __position; + } + iterator erase(iterator __first, iterator __last) { + _M_finish = copy(__last, end(), __first); + return __first; + } + void resize(size_type __new_size, bool __x = bool()) { + if (__new_size < size()) + erase(begin() + difference_type(__new_size), end()); + else + insert(end(), __new_size - size(), __x); + } + void flip() { + for (unsigned int* __p = _M_start._M_p; __p != _M_end_of_storage; ++__p) + *__p = ~*__p; + } + + void clear() { erase(begin(), end()); } + }; + +// This typedef is non-standard. It is provided for backward compatibility. +typedef vector bit_vector; + +} // namespace std + +#endif /* __SGI_STL_INTERNAL_BVECTOR_H */ + +// Local Variables: +// mode:C++ +// End: diff --git a/libstdc++-v3/include/ext/bvector b/libstdc++-v3/include/ext/bvector deleted file mode 100644 index d40fe50a5b5..00000000000 --- a/libstdc++-v3/include/ext/bvector +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * 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. - */ - -#ifndef __SGI_STL_BVECTOR_H -#define __SGI_STL_BVECTOR_H - - -#include -#include - -using std::bit_vector; - -#endif /* __SGI_STL_BVECTOR_H */ - -// Local Variables: -// mode:C++ -// End: - - diff --git a/libstdc++-v3/include/ext/stl_bvector.h b/libstdc++-v3/include/ext/stl_bvector.h deleted file mode 100644 index 7b768a4c3ed..00000000000 --- a/libstdc++-v3/include/ext/stl_bvector.h +++ /dev/null @@ -1,698 +0,0 @@ -/* - * - * 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-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. - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef __SGI_STL_INTERNAL_BVECTOR_H -#define __SGI_STL_INTERNAL_BVECTOR_H - -namespace std -{ - -static const int __WORD_BIT = int(CHAR_BIT*sizeof(unsigned int)); - -struct _Bit_reference { - unsigned int* _M_p; - unsigned int _M_mask; - _Bit_reference(unsigned int* __x, unsigned int __y) - : _M_p(__x), _M_mask(__y) {} - -public: - _Bit_reference() : _M_p(0), _M_mask(0) {} - operator bool() const { return !(!(*_M_p & _M_mask)); } - _Bit_reference& operator=(bool __x) - { - if (__x) *_M_p |= _M_mask; - else *_M_p &= ~_M_mask; - return *this; - } - _Bit_reference& operator=(const _Bit_reference& __x) - { return *this = bool(__x); } - bool operator==(const _Bit_reference& __x) const - { return bool(*this) == bool(__x); } - bool operator<(const _Bit_reference& __x) const { - return !bool(*this) && bool(__x); - } - void flip() { *_M_p ^= _M_mask; } -}; - -inline void swap(_Bit_reference __x, _Bit_reference __y) -{ - bool __tmp = __x; - __x = __y; - __y = __tmp; -} - -struct _Bit_iterator_base : public random_access_iterator -{ - unsigned int* _M_p; - unsigned int _M_offset; - - _Bit_iterator_base(unsigned int* __x, unsigned int __y) - : _M_p(__x), _M_offset(__y) {} - - void _M_bump_up() { - if (_M_offset++ == __WORD_BIT - 1) { - _M_offset = 0; - ++_M_p; - } - } - void _M_bump_down() { - if (_M_offset-- == 0) { - _M_offset = __WORD_BIT - 1; - --_M_p; - } - } - - void _M_incr(ptrdiff_t __i) { - difference_type __n = __i + _M_offset; - _M_p += __n / __WORD_BIT; - __n = __n % __WORD_BIT; - if (__n < 0) { - _M_offset = (unsigned int) __n + __WORD_BIT; - --_M_p; - } else - _M_offset = (unsigned int) __n; - } - - bool operator==(const _Bit_iterator_base& __i) const { - return _M_p == __i._M_p && _M_offset == __i._M_offset; - } - bool operator<(const _Bit_iterator_base& __i) const { - return _M_p < __i._M_p || (_M_p == __i._M_p && _M_offset < __i._M_offset); - } - bool operator!=(const _Bit_iterator_base& __i) const { - return !(*this == __i); - } - bool operator>(const _Bit_iterator_base& __i) const { - return __i < *this; - } - bool operator<=(const _Bit_iterator_base& __i) const { - return !(__i < *this); - } - bool operator>=(const _Bit_iterator_base& __i) const { - return !(*this < __i); - } -}; - -inline ptrdiff_t -operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { - return __WORD_BIT * (__x._M_p - __y._M_p) + __x._M_offset - __y._M_offset; -} - - -struct _Bit_iterator : public _Bit_iterator_base -{ - typedef _Bit_reference reference; - typedef _Bit_reference* pointer; - typedef _Bit_iterator iterator; - - _Bit_iterator() : _Bit_iterator_base(0, 0) {} - _Bit_iterator(unsigned int* __x, unsigned int __y) - : _Bit_iterator_base(__x, __y) {} - - reference operator*() const { return reference(_M_p, 1U << _M_offset); } - iterator& operator++() { - _M_bump_up(); - return *this; - } - iterator operator++(int) { - iterator __tmp = *this; - _M_bump_up(); - return __tmp; - } - iterator& operator--() { - _M_bump_down(); - return *this; - } - iterator operator--(int) { - iterator __tmp = *this; - _M_bump_down(); - return __tmp; - } - iterator& operator+=(difference_type __i) { - _M_incr(__i); - return *this; - } - iterator& operator-=(difference_type __i) { - *this += -__i; - return *this; - } - iterator operator+(difference_type __i) const { - iterator __tmp = *this; - return __tmp += __i; - } - iterator operator-(difference_type __i) const { - iterator __tmp = *this; - return __tmp -= __i; - } - - reference operator[](difference_type __i) { return *(*this + __i); } -}; - -inline _Bit_iterator -operator+(ptrdiff_t __n, const _Bit_iterator& __x) { return __x + __n; } - - -struct _Bit_const_iterator : public _Bit_iterator_base -{ - typedef bool reference; - typedef bool const_reference; - typedef const bool* pointer; - typedef _Bit_const_iterator const_iterator; - - _Bit_const_iterator() : _Bit_iterator_base(0, 0) {} - _Bit_const_iterator(unsigned int* __x, unsigned int __y) - : _Bit_iterator_base(__x, __y) {} - _Bit_const_iterator(const _Bit_iterator& __x) - : _Bit_iterator_base(__x._M_p, __x._M_offset) {} - - const_reference operator*() const { - return _Bit_reference(_M_p, 1U << _M_offset); - } - const_iterator& operator++() { - _M_bump_up(); - return *this; - } - const_iterator operator++(int) { - const_iterator __tmp = *this; - _M_bump_up(); - return __tmp; - } - const_iterator& operator--() { - _M_bump_down(); - return *this; - } - const_iterator operator--(int) { - const_iterator __tmp = *this; - _M_bump_down(); - return __tmp; - } - const_iterator& operator+=(difference_type __i) { - _M_incr(__i); - return *this; - } - const_iterator& operator-=(difference_type __i) { - *this += -__i; - return *this; - } - const_iterator operator+(difference_type __i) const { - const_iterator __tmp = *this; - return __tmp += __i; - } - const_iterator operator-(difference_type __i) const { - const_iterator __tmp = *this; - return __tmp -= __i; - } - const_reference operator[](difference_type __i) { - return *(*this + __i); - } -}; - -inline _Bit_const_iterator -operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) { return __x + __n; } - - -// Bit-vector base class, which encapsulates the difference between -// old SGI-style allocators and standard-conforming allocators. - -// Base class for ordinary allocators. -template -class _Bvector_alloc_base { -public: - typedef typename _Alloc_traits::allocator_type - allocator_type; - allocator_type get_allocator() const { return _M_data_allocator; } - - _Bvector_alloc_base(const allocator_type& __a) - : _M_data_allocator(__a), _M_start(), _M_finish(), _M_end_of_storage(0) {} - -protected: - unsigned int* _M_bit_alloc(size_t __n) - { return _M_data_allocator.allocate((__n + __WORD_BIT - 1)/__WORD_BIT); } - void _M_deallocate() { - if (_M_start._M_p) - _M_data_allocator.deallocate(_M_start._M_p, - _M_end_of_storage - _M_start._M_p); - } - - typename _Alloc_traits::allocator_type - _M_data_allocator; - _Bit_iterator _M_start; - _Bit_iterator _M_finish; - unsigned int* _M_end_of_storage; -}; - -// Specialization for instanceless allocators. -template -class _Bvector_alloc_base<_Allocator, true> { -public: - typedef typename _Alloc_traits::allocator_type - allocator_type; - allocator_type get_allocator() const { return allocator_type(); } - - _Bvector_alloc_base(const allocator_type&) - : _M_start(), _M_finish(), _M_end_of_storage(0) {} - -protected: - typedef typename _Alloc_traits::_Alloc_type - _Alloc_type; - - unsigned int* _M_bit_alloc(size_t __n) - { return _Alloc_type::allocate((__n + __WORD_BIT - 1)/__WORD_BIT); } - void _M_deallocate() { - if (_M_start._M_p) - _Alloc_type::deallocate(_M_start._M_p, - _M_end_of_storage - _M_start._M_p); - } - - _Bit_iterator _M_start; - _Bit_iterator _M_finish; - unsigned int* _M_end_of_storage; -}; - -template -class _Bvector_base - : public _Bvector_alloc_base<_Alloc, - _Alloc_traits::_S_instanceless> -{ - typedef _Bvector_alloc_base<_Alloc, - _Alloc_traits::_S_instanceless> - _Base; -public: - typedef typename _Base::allocator_type allocator_type; - - _Bvector_base(const allocator_type& __a) : _Base(__a) {} - ~_Bvector_base() { _Base::_M_deallocate(); } -}; - -} // namespace std - -// Declare a partial specialization of vector. -#include -namespace std -{ - -template - class vector : public _Bvector_base<_Alloc> - { - public: - typedef bool value_type; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef _Bit_reference reference; - typedef bool const_reference; - typedef _Bit_reference* pointer; - typedef const bool* const_pointer; - - typedef _Bit_iterator iterator; - typedef _Bit_const_iterator const_iterator; - - typedef reverse_iterator const_reverse_iterator; - typedef reverse_iterator reverse_iterator; - - typedef typename _Bvector_base<_Alloc>::allocator_type allocator_type; - allocator_type get_allocator() const { - return _Bvector_base<_Alloc>::get_allocator(); - } - - protected: - using _Bvector_base<_Alloc>::_M_bit_alloc; - using _Bvector_base<_Alloc>::_M_deallocate; - using _Bvector_base<_Alloc>::_M_start; - using _Bvector_base<_Alloc>::_M_finish; - using _Bvector_base<_Alloc>::_M_end_of_storage; - - protected: - void _M_initialize(size_type __n) { - unsigned int* __q = _M_bit_alloc(__n); - _M_end_of_storage = __q + (__n + __WORD_BIT - 1)/__WORD_BIT; - _M_start = iterator(__q, 0); - _M_finish = _M_start + difference_type(__n); - } - void _M_insert_aux(iterator __position, bool __x) { - if (_M_finish._M_p != _M_end_of_storage) { - copy_backward(__position, _M_finish, _M_finish + 1); - *__position = __x; - ++_M_finish; - } - else { - size_type __len = size() ? 2 * size() : __WORD_BIT; - unsigned int* __q = _M_bit_alloc(__len); - iterator __i = copy(begin(), __position, iterator(__q, 0)); - *__i++ = __x; - _M_finish = copy(__position, end(), __i); - _M_deallocate(); - _M_end_of_storage = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; - _M_start = iterator(__q, 0); - } - } - - template - void _M_initialize_range(_InputIterator __first, _InputIterator __last, - input_iterator_tag) { - _M_start = iterator(); - _M_finish = iterator(); - _M_end_of_storage = 0; - for ( ; __first != __last; ++__first) - push_back(*__first); - } - - template - void _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, - forward_iterator_tag) { - size_type __n = 0; - distance(__first, __last, __n); - _M_initialize(__n); - copy(__first, __last, _M_start); - } - - template - void _M_insert_range(iterator __pos, - _InputIterator __first, _InputIterator __last, - input_iterator_tag) { - for ( ; __first != __last; ++__first) { - __pos = insert(__pos, *__first); - ++__pos; - } - } - - template - void _M_insert_range(iterator __position, - _ForwardIterator __first, _ForwardIterator __last, - forward_iterator_tag) { - if (__first != __last) { - size_type __n = 0; - distance(__first, __last, __n); - if (capacity() - size() >= __n) { - copy_backward(__position, end(), _M_finish + difference_type(__n)); - copy(__first, __last, __position); - _M_finish += difference_type(__n); - } - else { - size_type __len = size() + max(size(), __n); - unsigned int* __q = _M_bit_alloc(__len); - iterator __i = copy(begin(), __position, iterator(__q, 0)); - __i = copy(__first, __last, __i); - _M_finish = copy(__position, end(), __i); - _M_deallocate(); - _M_end_of_storage = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; - _M_start = iterator(__q, 0); - } - } - } - - public: - iterator begin() { return _M_start; } - const_iterator begin() const { return _M_start; } - iterator end() { return _M_finish; } - const_iterator end() const { return _M_finish; } - - reverse_iterator rbegin() { return reverse_iterator(end()); } - const_reverse_iterator rbegin() const { - return const_reverse_iterator(end()); - } - reverse_iterator rend() { return reverse_iterator(begin()); } - const_reverse_iterator rend() const { - return const_reverse_iterator(begin()); - } - - size_type size() const { return size_type(end() - begin()); } - size_type max_size() const { return size_type(-1); } - size_type capacity() const { - return size_type(const_iterator(_M_end_of_storage, 0) - begin()); - } - bool empty() const { return begin() == end(); } - - reference operator[](size_type __n) - { return *(begin() + difference_type(__n)); } - const_reference operator[](size_type __n) const - { return *(begin() + difference_type(__n)); } - - void _M_range_check(size_type __n) const { - if (__n >= this->size()) - __throw_range_error("vector"); - } - - reference at(size_type __n) - { _M_range_check(__n); return (*this)[__n]; } - const_reference at(size_type __n) const - { _M_range_check(__n); return (*this)[__n]; } - - explicit vector(const allocator_type& __a = allocator_type()) - : _Bvector_base<_Alloc>(__a) {} - - vector(size_type __n, bool __value, - const allocator_type& __a = allocator_type()) - : _Bvector_base<_Alloc>(__a) - { - _M_initialize(__n); - fill(_M_start._M_p, _M_end_of_storage, __value ? ~0 : 0); - } - - explicit vector(size_type __n) - : _Bvector_base<_Alloc>(allocator_type()) - { - _M_initialize(__n); - fill(_M_start._M_p, _M_end_of_storage, 0); - } - - vector(const vector& __x) : _Bvector_base<_Alloc>(__x.get_allocator()) { - _M_initialize(__x.size()); - copy(__x.begin(), __x.end(), _M_start); - } - - // Check whether it's an integral type. If so, it's not an iterator. - - template - void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) { - _M_initialize(__n); - fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0); - } - - template - void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, - __false_type) { - _M_initialize_range(__first, __last, __ITERATOR_CATEGORY(__first)); - } - - template - vector(_InputIterator __first, _InputIterator __last, - const allocator_type& __a = allocator_type()) - : _Bvector_base<_Alloc>(__a) - { - typedef typename _Is_integer<_InputIterator>::_Integral _Integral; - _M_initialize_dispatch(__first, __last, _Integral()); - } - - ~vector() { } - - vector& operator=(const vector& __x) { - if (&__x == this) return *this; - if (__x.size() > capacity()) { - _M_deallocate(); - _M_initialize(__x.size()); - } - copy(__x.begin(), __x.end(), begin()); - _M_finish = begin() + difference_type(__x.size()); - return *this; - } - - // assign(), a generalized assignment member function. Two - // versions: one that takes a count, and one that takes a range. - // The range version is a member template, so we dispatch on whether - // or not the type is an integer. - - void _M_fill_assign(size_t __n, bool __x) { - if (__n > size()) { - fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0); - insert(end(), __n - size(), __x); - } - else { - erase(begin() + __n, end()); - fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0); - } - } - - void assign(size_t __n, bool __x) { _M_fill_assign(__n, __x); } - - template - void assign(_InputIterator __first, _InputIterator __last) { - typedef typename _Is_integer<_InputIterator>::_Integral _Integral; - _M_assign_dispatch(__first, __last, _Integral()); - } - - template - void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) - { _M_fill_assign((size_t) __n, (bool) __val); } - - template - void _M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type) - { _M_assign_aux(__first, __last, __ITERATOR_CATEGORY(__first)); } - - template - void _M_assign_aux(_InputIterator __first, _InputIterator __last, - input_iterator_tag) { - iterator __cur = begin(); - for ( ; __first != __last && __cur != end(); ++__cur, ++__first) - *__cur = *__first; - if (__first == __last) - erase(__cur, end()); - else - insert(end(), __first, __last); - } - - template - void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, - forward_iterator_tag) { - size_type __len = 0; - distance(__first, __last, __len); - if (__len < size()) - erase(copy(__first, __last, begin()), end()); - else { - _ForwardIterator __mid = __first; - advance(__mid, size()); - copy(__first, __mid, begin()); - insert(end(), __mid, __last); - } - } - - void reserve(size_type __n) { - if (capacity() < __n) { - unsigned int* __q = _M_bit_alloc(__n); - _M_finish = copy(begin(), end(), iterator(__q, 0)); - _M_deallocate(); - _M_start = iterator(__q, 0); - _M_end_of_storage = __q + (__n + __WORD_BIT - 1)/__WORD_BIT; - } - } - - reference front() { return *begin(); } - const_reference front() const { return *begin(); } - reference back() { return *(end() - 1); } - const_reference back() const { return *(end() - 1); } - void push_back(bool __x) { - if (_M_finish._M_p != _M_end_of_storage) - *_M_finish++ = __x; - else - _M_insert_aux(end(), __x); - } - void swap(vector& __x) { - std::swap(_M_start, __x._M_start); - std::swap(_M_finish, __x._M_finish); - std::swap(_M_end_of_storage, __x._M_end_of_storage); - } - iterator insert(iterator __position, bool __x = bool()) { - difference_type __n = __position - begin(); - if (_M_finish._M_p != _M_end_of_storage && __position == end()) - *_M_finish++ = __x; - else - _M_insert_aux(__position, __x); - return begin() + __n; - } - - // Check whether it's an integral type. If so, it's not an iterator. - - template - void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, - __true_type) { - _M_fill_insert(__pos, __n, __x); - } - - template - void _M_insert_dispatch(iterator __pos, - _InputIterator __first, _InputIterator __last, - __false_type) { - _M_insert_range(__pos, __first, __last, __ITERATOR_CATEGORY(__first)); - } - - template - void insert(iterator __position, - _InputIterator __first, _InputIterator __last) { - typedef typename _Is_integer<_InputIterator>::_Integral _Integral; - _M_insert_dispatch(__position, __first, __last, _Integral()); - } - - void _M_fill_insert(iterator __position, size_type __n, bool __x) { - if (__n == 0) return; - if (capacity() - size() >= __n) { - copy_backward(__position, end(), _M_finish + difference_type(__n)); - fill(__position, __position + difference_type(__n), __x); - _M_finish += difference_type(__n); - } - else { - size_type __len = size() + max(size(), __n); - unsigned int* __q = _M_bit_alloc(__len); - iterator __i = copy(begin(), __position, iterator(__q, 0)); - fill_n(__i, __n, __x); - _M_finish = copy(__position, end(), __i + difference_type(__n)); - _M_deallocate(); - _M_end_of_storage = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; - _M_start = iterator(__q, 0); - } - } - - void insert(iterator __position, size_type __n, bool __x) { - _M_fill_insert(__position, __n, __x); - } - - void pop_back() { --_M_finish; } - iterator erase(iterator __position) { - if (__position + 1 != end()) - copy(__position + 1, end(), __position); - --_M_finish; - return __position; - } - iterator erase(iterator __first, iterator __last) { - _M_finish = copy(__last, end(), __first); - return __first; - } - void resize(size_type __new_size, bool __x = bool()) { - if (__new_size < size()) - erase(begin() + difference_type(__new_size), end()); - else - insert(end(), __new_size - size(), __x); - } - void flip() { - for (unsigned int* __p = _M_start._M_p; __p != _M_end_of_storage; ++__p) - *__p = ~*__p; - } - - void clear() { erase(begin(), end()); } - }; - -// This typedef is non-standard. It is provided for backward compatibility. -typedef vector bit_vector; - -} // namespace std - -#endif /* __SGI_STL_INTERNAL_BVECTOR_H */ - -// Local Variables: -// mode:C++ -// End: diff --git a/libstdc++-v3/include/ext/tree b/libstdc++-v3/include/ext/tree deleted file mode 100644 index f6faf976e34..00000000000 --- a/libstdc++-v3/include/ext/tree +++ /dev/null @@ -1,23 +0,0 @@ - -/* - * 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. - * - */ - -#ifndef _CPP_EXT_TREE -#define _CPP_EXT_TREE 1 -#include -#endif - -// Local Variables: -// mode:C++ -// End: diff --git a/libstdc++-v3/mkcheck.in b/libstdc++-v3/mkcheck.in index 72a2b76ff21..0d59d8b137a 100755 --- a/libstdc++-v3/mkcheck.in +++ b/libstdc++-v3/mkcheck.in @@ -320,9 +320,7 @@ test_file() # time_t's (no more overhead than grabbing two date(1)'s). compiler_invocation="$LTCXX $S_FLAG $SRC_NAME -o $EXENAME" COMP_TIME_START=$($TIMER_COMMAND) - echo $SRC_NAME >> compile.out $compiler_invocation >> compile.out 2>&1 - echo "" >> compile.out COMP_TIME_END=$($TIMER_COMMAND) if [ $COMP_TIME_START -lt $COMP_TIME_END ]; then @@ -332,7 +330,7 @@ test_file() fi if [ -f $EXENAME ]; then -# rm compile.out + rm compile.out size_command TEXT size_command DATA size_command SIZE @@ -370,8 +368,8 @@ test_file() else # the file did not compile/link. printf "\n" >> $LOG_FILE -# `cat compile.out >> $LOG_FILE` -# rm compile.out + `cat compile.out >> $LOG_FILE` + rm compile.out RESULT="-b" TEXT="0" DATA="0" diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index 243b7eb57bf..59ff5420525 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -21,7 +21,7 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ## USA. -## $Id: Makefile.am,v 1.78 2001/03/25 00:16:56 pme Exp $ +## $Id: Makefile.am,v 1.79 2001/03/28 01:19:42 aoliva Exp $ AUTOMAKE_OPTIONS = 1.3 gnits MAINT_CHARSET = latin1 @@ -94,7 +94,7 @@ base_headers = \ bits/stl_relops.h bits/stl_set.h \ bits/stl_stack.h bits/stl_tempbuf.h \ bits/stl_tree.h bits/stl_uninitialized.h bits/stl_vector.h \ - bits/type_traits.h bits/std_algorithm.h \ + bits/stl_bvector.h bits/type_traits.h bits/std_algorithm.h \ bits/concept_checks.h bits/container_concepts.h \ bits/sequence_concepts.h bits/stl_construct.h @@ -104,18 +104,18 @@ backward_headers = \ backward/algo.h backward/algobase.h backward/alloc.h \ backward/bvector.h backward/defalloc.h backward/deque.h \ backward/function.h backward/hash_map.h backward/hash_set.h \ - backward/hashtable.h backward/heap.h backward/iterator.h \ - backward/list.h backward/map.h backward/multimap.h backward/new.h \ - backward/multiset.h backward/pair.h backward/iostream.h \ - backward/rope.h backward/set.h backward/slist.h backward/stack.h \ - backward/tempbuf.h backward/tree.h backward/vector.h \ - backward/fstream.h backward/strstream.h backward/strstream + backward/hashtable.h backward/heap.h backward/iostream.h \ + backward/iterator.h backward/list.h backward/map.h \ + backward/multimap.h backward/new.h backward/multiset.h \ + backward/pair.h backward/queue.h backward/rope.h backward/set.h \ + backward/slist.h backward/stack.h backward/tempbuf.h backward/tree.h \ + backward/vector.h backward/fstream.h backward/strstream.h \ + backward/strstream ext_headers = \ - ext/ropeimpl.h ext/stl_rope.h \ - ext/stl_bvector.h ext/stl_hashtable.h ext/stl_hash_fun.h \ - ext/hash_map ext/hash_set ext/rope ext/slist \ - ext/tree ext/bvector + ext/rope ext/ropeimpl.h ext/stl_rope.h \ + ext/slist ext/hash_map ext/hash_set \ + ext/stl_hashtable.h ext/stl_hash_fun.h c_base_headers = \ bits/std_cassert.h bits/std_cctype.h bits/std_cerrno.h \ diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index ade75536eb9..4dc4de842c9 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -140,13 +140,13 @@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ INCLUDES = -nostdinc++ -I$(GLIBCPP_INCLUDE_DIR) $(CSTD_INCLUDES) -I$(top_builddir)/include $(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) $(TOPLEVEL_INCLUDES) -base_headers = bits/cpp_type_traits.h bits/char_traits.h bits/codecvt.h bits/stringfwd.h bits/std_string.h bits/basic_string.h bits/basic_string.tcc bits/generic_shadow.h bits/std_utility.h bits/std_complex.h bits/valarray_array.h bits/valarray_array.tcc bits/valarray_meta.h bits/std_valarray.h bits/mask_array.h bits/slice.h bits/slice_array.h bits/gslice.h bits/gslice_array.h bits/indirect_array.h bits/std_fstream.h bits/std_iomanip.h bits/ios_base.h bits/fpos.h bits/basic_ios.h bits/basic_ios.tcc bits/std_ios.h bits/std_iosfwd.h bits/std_iostream.h bits/std_istream.h bits/istream.tcc bits/std_locale.h bits/fstream.tcc bits/ostream.tcc bits/sbuf_iter.h bits/sstream.tcc bits/std_ostream.h bits/std_sstream.h bits/std_streambuf.h bits/streambuf.tcc bits/basic_file.h bits/locale_facets.h bits/locale_facets.tcc bits/localefwd.h bits/stl_pthread_alloc.h bits/pthread_allocimpl.h bits/stl_threads.h bits/stl_iterator_base.h bits/std_bitset.h bits/std_deque.h bits/std_functional.h bits/std_iterator.h bits/std_list.h bits/std_map.h bits/std_memory.h bits/std_numeric.h bits/std_queue.h bits/std_set.h bits/std_stack.h bits/std_stdexcept.h bits/functexcept.h bits/std_vector.h bits/stl_algo.h bits/stl_algobase.h bits/stl_alloc.h bits/stl_deque.h bits/stl_function.h bits/stl_heap.h bits/stl_iterator.h bits/stl_list.h bits/stl_map.h bits/stl_multimap.h bits/stl_multiset.h bits/stl_numeric.h bits/stl_pair.h bits/stl_queue.h bits/stl_raw_storage_iter.h bits/stl_relops.h bits/stl_set.h bits/stl_stack.h bits/stl_tempbuf.h bits/stl_tree.h bits/stl_uninitialized.h bits/stl_vector.h bits/type_traits.h bits/std_algorithm.h bits/concept_checks.h bits/container_concepts.h bits/sequence_concepts.h bits/stl_construct.h +base_headers = bits/cpp_type_traits.h bits/char_traits.h bits/codecvt.h bits/stringfwd.h bits/std_string.h bits/basic_string.h bits/basic_string.tcc bits/generic_shadow.h bits/std_utility.h bits/std_complex.h bits/valarray_array.h bits/valarray_array.tcc bits/valarray_meta.h bits/std_valarray.h bits/mask_array.h bits/slice.h bits/slice_array.h bits/gslice.h bits/gslice_array.h bits/indirect_array.h bits/std_fstream.h bits/std_iomanip.h bits/ios_base.h bits/fpos.h bits/basic_ios.h bits/basic_ios.tcc bits/std_ios.h bits/std_iosfwd.h bits/std_iostream.h bits/std_istream.h bits/istream.tcc bits/std_locale.h bits/fstream.tcc bits/ostream.tcc bits/sbuf_iter.h bits/sstream.tcc bits/std_ostream.h bits/std_sstream.h bits/std_streambuf.h bits/streambuf.tcc bits/basic_file.h bits/locale_facets.h bits/locale_facets.tcc bits/localefwd.h bits/stl_pthread_alloc.h bits/pthread_allocimpl.h bits/stl_threads.h bits/stl_iterator_base.h bits/std_bitset.h bits/std_deque.h bits/std_functional.h bits/std_iterator.h bits/std_list.h bits/std_map.h bits/std_memory.h bits/std_numeric.h bits/std_queue.h bits/std_set.h bits/std_stack.h bits/std_stdexcept.h bits/functexcept.h bits/std_vector.h bits/stl_algo.h bits/stl_algobase.h bits/stl_alloc.h bits/stl_deque.h bits/stl_function.h bits/stl_heap.h bits/stl_iterator.h bits/stl_list.h bits/stl_map.h bits/stl_multimap.h bits/stl_multiset.h bits/stl_numeric.h bits/stl_pair.h bits/stl_queue.h bits/stl_raw_storage_iter.h bits/stl_relops.h bits/stl_set.h bits/stl_stack.h bits/stl_tempbuf.h bits/stl_tree.h bits/stl_uninitialized.h bits/stl_vector.h bits/stl_bvector.h bits/type_traits.h bits/std_algorithm.h bits/concept_checks.h bits/container_concepts.h bits/sequence_concepts.h bits/stl_construct.h -backward_headers = backward/complex.h backward/iomanip.h backward/istream.h backward/ostream.h backward/stream.h backward/streambuf.h backward/algo.h backward/algobase.h backward/alloc.h backward/bvector.h backward/defalloc.h backward/deque.h backward/function.h backward/hash_map.h backward/hash_set.h backward/hashtable.h backward/heap.h backward/iterator.h backward/list.h backward/map.h backward/multimap.h backward/new.h backward/multiset.h backward/pair.h backward/iostream.h backward/rope.h backward/set.h backward/slist.h backward/stack.h backward/tempbuf.h backward/tree.h backward/vector.h backward/fstream.h backward/strstream.h backward/strstream +backward_headers = backward/complex.h backward/iomanip.h backward/istream.h backward/ostream.h backward/stream.h backward/streambuf.h backward/algo.h backward/algobase.h backward/alloc.h backward/bvector.h backward/defalloc.h backward/deque.h backward/function.h backward/hash_map.h backward/hash_set.h backward/hashtable.h backward/heap.h backward/iostream.h backward/iterator.h backward/list.h backward/map.h backward/multimap.h backward/new.h backward/multiset.h backward/pair.h backward/queue.h backward/rope.h backward/set.h backward/slist.h backward/stack.h backward/tempbuf.h backward/tree.h backward/vector.h backward/fstream.h backward/strstream.h backward/strstream -ext_headers = ext/ropeimpl.h ext/stl_rope.h ext/stl_bvector.h ext/stl_hashtable.h ext/stl_hash_fun.h ext/hash_map ext/hash_set ext/rope ext/slist ext/tree ext/bvector +ext_headers = ext/rope ext/ropeimpl.h ext/stl_rope.h ext/slist ext/hash_map ext/hash_set ext/stl_hashtable.h ext/stl_hash_fun.h c_base_headers = bits/std_cassert.h bits/std_cctype.h bits/std_cerrno.h bits/std_cfloat.h bits/std_climits.h bits/std_clocale.h bits/std_cmath.h bits/std_csetjmp.h bits/std_csignal.h bits/std_cstdarg.h bits/std_cstddef.h bits/std_cstdio.h bits/std_cstdlib.h bits/std_cstring.h bits/std_ctime.h bits/std_cwchar.h bits/std_cwctype.h bits/cmath.tcc diff --git a/libstdc++-v3/testsuite/ext/headers.cc b/libstdc++-v3/testsuite/ext/headers.cc index d596bf98b96..297674db1c3 100644 --- a/libstdc++-v3/testsuite/ext/headers.cc +++ b/libstdc++-v3/testsuite/ext/headers.cc @@ -1,6 +1,6 @@ // 1999-06-23 bkoz -// Copyright (C) 1999 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 @@ -23,11 +23,9 @@ // This should include a list of all headers in the extension // subdirectory that are meant to be directly included. -#include #include #include #include #include -#include int main() { }