aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrendan Kehoe <brendan@zen.org>2001-10-19 14:39:00 -0400
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2001-10-19 18:39:00 +0000
commitba317c52361d1a16fac60b56af38198df9833dde (patch)
tree1e69304deac7d973721960fafc3e3cb5d9617dfd
parentd7ac9bdd42637b05702a61085f18b136b87f21ef (diff)
downloadgcc-ba317c52361d1a16fac60b56af38198df9833dde.zip
gcc-ba317c52361d1a16fac60b56af38198df9833dde.tar.gz
gcc-ba317c52361d1a16fac60b56af38198df9833dde.tar.bz2
[multiple changes]
2001-08-19 Brendan Kehoe <brendan@zen.org> * include/bits/std_complex.h: Default initialize second argument of polar to 0, as specified in Library DR #79 2001-10-19 Brendan Kehoe <brendan@zen.org> * include/bits/stl_raw_storage_iter.h (operator=): Fix to call _Construct instead of construct. 2001-10-19 Brendan Kehoe <brendan@zen.org> * include/bits/basic_string.tcc (find_first_not_of): Take out check for __n being non-zero, since the standard does not mandate that. e.g., a search for "" in "" should yield position 0, not npos. (find_last_not_of): Likewise. 2001-10-19 Brendan Kehoe <brendan@zen.org> * include/bits/stl_bvector.h (vector<bool>::_M_range_check): Fix to throw out_of_range, not range_error, thus sayeth $23.1.1.13. 2001-10-19 Brendan Kehoe <brendan@zen.org> * include/bits/stl_iterator.h (reverse_iterator::current): Rename member from _M_current, and change all uses; thus sayeth $24.4.1.1. 2001-10-19 Brendan Kehoe <brendan@zen.org> * include/bits/stl_algo.h (partial_sort): Add missing `>' on the template parameter _ValueType. 2001-10-19 Brendan Kehoe <brendan@zen.org> * include/bits/std_limits.h: Clean up extra semicolons. * include/bits/locale_facets.h: Likewise. * include/bits/type_traits.h: Likewise. 2001-10-19 Brendan Kehoe <brendan@zen.org> * include/bits/localefwd.h (locale::combine): Add const for lib DR 14. * include/bits/locale_facets.tcc (locale::combine): Likewise. From-SVN: r46353
-rw-r--r--libstdc++-v3/ChangeLog43
-rw-r--r--libstdc++-v3/include/bits/basic_string.tcc4
-rw-r--r--libstdc++-v3/include/bits/locale_facets.h2
-rw-r--r--libstdc++-v3/include/bits/locale_facets.tcc2
-rw-r--r--libstdc++-v3/include/bits/localefwd.h2
-rw-r--r--libstdc++-v3/include/bits/std_complex.h2
-rw-r--r--libstdc++-v3/include/bits/std_limits.h4
-rw-r--r--libstdc++-v3/include/bits/stl_algo.h2
-rw-r--r--libstdc++-v3/include/bits/stl_bvector.h2
-rw-r--r--libstdc++-v3/include/bits/stl_iterator.h30
-rw-r--r--libstdc++-v3/include/bits/stl_raw_storage_iter.h2
-rw-r--r--libstdc++-v3/include/bits/type_traits.h7
12 files changed, 73 insertions, 29 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index a26b390..af6372c 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,46 @@
+2001-08-19 Brendan Kehoe <brendan@zen.org>
+
+ * include/bits/std_complex.h: Default initialize second argument
+ of polar to 0, as specified in Library DR #79
+
+2001-10-19 Brendan Kehoe <brendan@zen.org>
+
+ * include/bits/stl_raw_storage_iter.h (operator=): Fix to call
+ _Construct instead of construct.
+
+2001-10-19 Brendan Kehoe <brendan@zen.org>
+
+ * include/bits/basic_string.tcc (find_first_not_of): Take out check for
+ __n being non-zero, since the standard does not mandate that.
+ e.g., a search for "" in "" should yield position 0, not npos.
+ (find_last_not_of): Likewise.
+
+2001-10-19 Brendan Kehoe <brendan@zen.org>
+
+ * include/bits/stl_bvector.h (vector<bool>::_M_range_check): Fix
+ to throw out_of_range, not range_error, thus sayeth $23.1.1.13.
+
+2001-10-19 Brendan Kehoe <brendan@zen.org>
+
+ * include/bits/stl_iterator.h (reverse_iterator::current): Rename
+ member from _M_current, and change all uses; thus sayeth $24.4.1.1.
+
+2001-10-19 Brendan Kehoe <brendan@zen.org>
+
+ * include/bits/stl_algo.h (partial_sort): Add missing `>' on the
+ template parameter _ValueType.
+
+2001-10-19 Brendan Kehoe <brendan@zen.org>
+
+ * include/bits/std_limits.h: Clean up extra semicolons.
+ * include/bits/locale_facets.h: Likewise.
+ * include/bits/type_traits.h: Likewise.
+
+2001-10-19 Brendan Kehoe <brendan@zen.org>
+
+ * include/bits/localefwd.h (locale::combine): Add const for lib DR 14.
+ * include/bits/locale_facets.tcc (locale::combine): Likewise.
+
2001-10-19 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/locale_facets.h (__timepunct::_M_put_helper):
diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc
index faa88a2..7190e2e 100644
--- a/libstdc++-v3/include/bits/basic_string.tcc
+++ b/libstdc++-v3/include/bits/basic_string.tcc
@@ -698,7 +698,7 @@ namespace std
find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const
{
size_t __xpos = __pos;
- for (; __n && __xpos < this->size(); ++__xpos)
+ for (; __xpos < this->size(); ++__xpos)
if (!traits_type::find(__s, __n, _M_data()[__xpos]))
return __xpos;
return npos;
@@ -722,7 +722,7 @@ namespace std
find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const
{
size_type __size = this->size();
- if (__size && __n)
+ if (__size)
{
if (--__size > __pos)
__size = __pos;
diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h
index 4beb713..2c6419b 100644
--- a/libstdc++-v3/include/bits/locale_facets.h
+++ b/libstdc++-v3/include/bits/locale_facets.h
@@ -990,7 +990,7 @@ namespace std
_M_compare_helper(const _CharT*, const _CharT*) const;
size_t
- _M_transform_helper(_CharT*, const _CharT*, size_t) const;;
+ _M_transform_helper(_CharT*, const _CharT*, size_t) const;
protected:
virtual
diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc
index c4d972c..7072c0b 100644
--- a/libstdc++-v3/include/bits/locale_facets.tcc
+++ b/libstdc++-v3/include/bits/locale_facets.tcc
@@ -46,7 +46,7 @@ namespace std
{
template<typename _Facet>
locale
- locale::combine(const locale& __other)
+ locale::combine(const locale& __other) const
{
_Impl* __tmp = new _Impl(*_M_impl, 1);
__tmp->_M_replace_facet(__other._M_impl, &_Facet::id);
diff --git a/libstdc++-v3/include/bits/localefwd.h b/libstdc++-v3/include/bits/localefwd.h
index 67894b4..e6bd6cc 100644
--- a/libstdc++-v3/include/bits/localefwd.h
+++ b/libstdc++-v3/include/bits/localefwd.h
@@ -234,7 +234,7 @@ namespace std
template<typename _Facet>
locale
- combine(const locale& __other);
+ combine(const locale& __other) const;
// Locale operations:
string
diff --git a/libstdc++-v3/include/bits/std_complex.h b/libstdc++-v3/include/bits/std_complex.h
index be8d9531..3d4b434 100644
--- a/libstdc++-v3/include/bits/std_complex.h
+++ b/libstdc++-v3/include/bits/std_complex.h
@@ -56,7 +56,7 @@ namespace std
template<typename _Tp> _Tp norm(const complex<_Tp>&);
template<typename _Tp> complex<_Tp> conj(const complex<_Tp>&);
- template<typename _Tp> complex<_Tp> polar(const _Tp&, const _Tp&);
+ template<typename _Tp> complex<_Tp> polar(const _Tp&, const _Tp& = 0);
// Transcendentals:
template<typename _Tp> complex<_Tp> cos(const complex<_Tp>&);
diff --git a/libstdc++-v3/include/bits/std_limits.h b/libstdc++-v3/include/bits/std_limits.h
index e988db2..d0f0479 100644
--- a/libstdc++-v3/include/bits/std_limits.h
+++ b/libstdc++-v3/include/bits/std_limits.h
@@ -1861,8 +1861,8 @@ namespace std
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;;
+ __glibcpp_double_has_denorm;
+ static const bool has_denorm_loss = __glibcpp_double_has_denorm_loss;
static double infinity() throw()
{ return __glibcpp_double_infinity; }
diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h
index 66fd67e..61a2d2e 100644
--- a/libstdc++-v3/include/bits/stl_algo.h
+++ b/libstdc++-v3/include/bits/stl_algo.h
@@ -1952,7 +1952,7 @@ __result, __binary_pred, _IterType());
// concept requirements
__glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
_RandomAccessIter>);
- __glibcpp_function_requires(_LessThanComparableConcept<_ValueType);
+ __glibcpp_function_requires(_LessThanComparableConcept<_ValueType>);
make_heap(__first, __middle);
for (_RandomAccessIter __i = __middle; __i < __last; ++__i)
diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h
index 9a46cf5..9a51f5e 100644
--- a/libstdc++-v3/include/bits/stl_bvector.h
+++ b/libstdc++-v3/include/bits/stl_bvector.h
@@ -485,7 +485,7 @@ template <typename _Alloc>
void _M_range_check(size_type __n) const {
if (__n >= this->size())
- __throw_range_error("vector<bool>");
+ __throw_out_of_range("vector<bool>");
}
reference at(size_type __n)
diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h
index a68613b..3929f79 100644
--- a/libstdc++-v3/include/bits/stl_iterator.h
+++ b/libstdc++-v3/include/bits/stl_iterator.h
@@ -72,7 +72,7 @@ namespace std
typename iterator_traits<_Iterator>::reference>
{
protected:
- _Iterator _M_current;
+ _Iterator current;
public:
typedef _Iterator iterator_type;
@@ -85,22 +85,22 @@ namespace std
reverse_iterator() {}
explicit
- reverse_iterator(iterator_type __x) : _M_current(__x) {}
+ reverse_iterator(iterator_type __x) : current(__x) {}
reverse_iterator(const reverse_iterator& __x)
- : _M_current(__x._M_current) { }
+ : current(__x.current) { }
template<typename _Iter>
reverse_iterator(const reverse_iterator<_Iter>& __x)
- : _M_current(__x.base()) {}
+ : current(__x.base()) {}
iterator_type
- base() const { return _M_current; }
+ base() const { return current; }
reference
operator*() const
{
- _Iterator __tmp = _M_current;
+ _Iterator __tmp = current;
return *--__tmp;
}
@@ -110,7 +110,7 @@ namespace std
reverse_iterator&
operator++()
{
- --_M_current;
+ --current;
return *this;
}
@@ -118,38 +118,38 @@ namespace std
operator++(int)
{
reverse_iterator __tmp = *this;
- --_M_current;
+ --current;
return __tmp;
}
reverse_iterator&
operator--()
{
- ++_M_current;
+ ++current;
return *this;
}
reverse_iterator operator--(int)
{
reverse_iterator __tmp = *this;
- ++_M_current;
+ ++current;
return __tmp;
}
reverse_iterator
operator+(difference_type __n) const
- { return reverse_iterator(_M_current - __n); }
+ { return reverse_iterator(current - __n); }
reverse_iterator&
operator+=(difference_type __n)
{
- _M_current -= __n;
+ current -= __n;
return *this;
}
reverse_iterator
operator-(difference_type __n) const
- { return reverse_iterator(_M_current + __n); }
+ { return reverse_iterator(current + __n); }
reverse_iterator&
operator-=(difference_type __n)
@@ -225,7 +225,7 @@ namespace std
back_insert_iterator(_Container& __x) : container(&__x) {}
back_insert_iterator&
- operator=(const typename _Container::const_reference __value)
+ operator=(typename _Container::const_reference __value)
{
container->push_back(__value);
return *this;
@@ -259,7 +259,7 @@ namespace std
explicit front_insert_iterator(_Container& __x) : container(&__x) {}
front_insert_iterator&
- operator=(const typename _Container::const_reference __value)
+ operator=(typename _Container::const_reference __value)
{
container->push_front(__value);
return *this;
diff --git a/libstdc++-v3/include/bits/stl_raw_storage_iter.h b/libstdc++-v3/include/bits/stl_raw_storage_iter.h
index 5dc2af4..e513db5 100644
--- a/libstdc++-v3/include/bits/stl_raw_storage_iter.h
+++ b/libstdc++-v3/include/bits/stl_raw_storage_iter.h
@@ -79,7 +79,7 @@ namespace std
raw_storage_iterator&
operator=(const _Tp& __element)
{
- construct(&*_M_iter, __element);
+ _Construct(&*_M_iter, __element);
return *this;
}
diff --git a/libstdc++-v3/include/bits/type_traits.h b/libstdc++-v3/include/bits/type_traits.h
index 08bceed..2fd78ba 100644
--- a/libstdc++-v3/include/bits/type_traits.h
+++ b/libstdc++-v3/include/bits/type_traits.h
@@ -327,9 +327,10 @@ template<typename _Tp> struct _Is_normal_iterator {
};
// Forward declaration hack, should really include this from somewhere.
-namespace std {
- template<typename _Iterator, typename _Container> class __normal_iterator;
-};
+namespace std
+{
+ template<typename _Iterator, typename _Container> class __normal_iterator;
+}
template<typename _Iterator, typename _Container>
struct _Is_normal_iterator< std::__normal_iterator<_Iterator, _Container> > {