diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 509c0ed19f3..f5a7826c3d8 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,15 @@ +2003-07-04 Paolo Carlini + + * include/bits/stl_list.h: Fully qualify standard + functions with std::, thus avoiding Koenig lookup. + * include/bits/stl_queue.h: Likewise. + * include/bits/stl_raw_storage_iter.h: Likewise. + * include/bits/stl_tempbuf.h: Likewise. + * include/bits/stl_tree.h: Likewise. + * include/bits/stl_uninitialized.h: Likewise. + * include/bits/stl_vector.h: Likewise. + * include/ext/rope: Change includes order. + 2003-07-04 Benjamin Kosnik * configure.host (fpos_include_dir): Fix. diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h index 46d9e7b6bda..0fa7cd23a7b 100644 --- a/libstdc++-v3/include/bits/stl_list.h +++ b/libstdc++-v3/include/bits/stl_list.h @@ -410,7 +410,7 @@ namespace std { _Node* __p = _M_get_node(); try { - _Construct(&__p->_M_data, __x); + std::_Construct(&__p->_M_data, __x); } catch(...) { @@ -431,7 +431,7 @@ namespace std { _Node* __p = _M_get_node(); try { - _Construct(&__p->_M_data); + std::_Construct(&__p->_M_data); } catch(...) { @@ -1073,8 +1073,8 @@ namespace std inline bool operator<(const list<_Tp,_Alloc>& __x, const list<_Tp,_Alloc>& __y) { - return lexicographical_compare(__x.begin(), __x.end(), - __y.begin(), __y.end()); + return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); } /// Based on operator== diff --git a/libstdc++-v3/include/bits/stl_queue.h b/libstdc++-v3/include/bits/stl_queue.h index c69b7ee0557..38c378c8773 100644 --- a/libstdc++-v3/include/bits/stl_queue.h +++ b/libstdc++-v3/include/bits/stl_queue.h @@ -1,6 +1,6 @@ // Queue implementation -*- C++ -*- -// Copyright (C) 2001, 2002 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003 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 @@ -332,7 +332,7 @@ namespace std priority_queue(const _Compare& __x = _Compare(), const _Sequence& __s = _Sequence()) : c(__s), comp(__x) - { make_heap(c.begin(), c.end(), comp); } + { std::make_heap(c.begin(), c.end(), comp); } /** * @brief Builds a %queue from a range. @@ -355,7 +355,7 @@ namespace std : c(__s), comp(__x) { c.insert(c.end(), __first, __last); - make_heap(c.begin(), c.end(), comp); + std::make_heap(c.begin(), c.end(), comp); } /** @@ -389,7 +389,7 @@ namespace std try { c.push_back(__x); - push_heap(c.begin(), c.end(), comp); + std::push_heap(c.begin(), c.end(), comp); } catch(...) { @@ -413,7 +413,7 @@ namespace std { try { - pop_heap(c.begin(), c.end(), comp); + std::pop_heap(c.begin(), c.end(), comp); c.pop_back(); } catch(...) diff --git a/libstdc++-v3/include/bits/stl_raw_storage_iter.h b/libstdc++-v3/include/bits/stl_raw_storage_iter.h index 59aa004296e..c4ff66963c5 100644 --- a/libstdc++-v3/include/bits/stl_raw_storage_iter.h +++ b/libstdc++-v3/include/bits/stl_raw_storage_iter.h @@ -84,7 +84,7 @@ namespace std raw_storage_iterator& operator=(const _Tp& __element) { - _Construct(&*_M_iter, __element); + std::_Construct(&*_M_iter, __element); return *this; } diff --git a/libstdc++-v3/include/bits/stl_tempbuf.h b/libstdc++-v3/include/bits/stl_tempbuf.h index 000e64a661a..4f90402fea2 100644 --- a/libstdc++-v3/include/bits/stl_tempbuf.h +++ b/libstdc++-v3/include/bits/stl_tempbuf.h @@ -99,7 +99,7 @@ template void _M_initialize_buffer(const _Tp&, __true_type) {} void _M_initialize_buffer(const _Tp& val, __false_type) { - uninitialized_fill_n(_M_buffer, _M_len, val); + std::uninitialized_fill_n(_M_buffer, _M_len, val); } public: @@ -133,7 +133,7 @@ public: } ~_Temporary_buffer() { - _Destroy(_M_buffer, _M_buffer + _M_len); + std::_Destroy(_M_buffer, _M_buffer + _M_len); free(_M_buffer); } diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h index 895b98a6a52..95482f25de0 100644 --- a/libstdc++-v3/include/bits/stl_tree.h +++ b/libstdc++-v3/include/bits/stl_tree.h @@ -615,7 +615,7 @@ namespace std { _Link_type __tmp = _M_get_node(); try - { _Construct(&__tmp->_M_value_field, __x); } + { std::_Construct(&__tmp->_M_value_field, __x); } catch(...) { _M_put_node(__tmp); @@ -637,7 +637,7 @@ namespace std void destroy_node(_Link_type __p) { - _Destroy(&__p->_M_value_field); + std::_Destroy(&__p->_M_value_field); _M_put_node(__p); } diff --git a/libstdc++-v3/include/bits/stl_uninitialized.h b/libstdc++-v3/include/bits/stl_uninitialized.h index 5f860580433..e2106e0a50a 100644 --- a/libstdc++-v3/include/bits/stl_uninitialized.h +++ b/libstdc++-v3/include/bits/stl_uninitialized.h @@ -73,7 +73,7 @@ namespace std __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, __true_type) - { return copy(__first, __last, __result); } + { return std::copy(__first, __last, __result); } template _ForwardIterator @@ -84,12 +84,12 @@ namespace std _ForwardIterator __cur = __result; try { for ( ; __first != __last; ++__first, ++__cur) - _Construct(&*__cur, *__first); + std::_Construct(&*__cur, *__first); return __cur; } catch(...) { - _Destroy(__result, __cur); + std::_Destroy(__result, __cur); __throw_exception_again; } } @@ -109,13 +109,13 @@ namespace std { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD; - return __uninitialized_copy_aux(__first, __last, __result, _Is_POD()); + return std::__uninitialized_copy_aux(__first, __last, __result, _Is_POD()); } inline char* uninitialized_copy(const char* __first, const char* __last, char* __result) { - memmove(__result, __first, __last - __first); + std::memmove(__result, __first, __last - __first); return __result + (__last - __first); } @@ -123,7 +123,7 @@ namespace std uninitialized_copy(const wchar_t* __first, const wchar_t* __last, wchar_t* __result) { - memmove(__result, __first, sizeof(wchar_t) * (__last - __first)); + std::memmove(__result, __first, sizeof(wchar_t) * (__last - __first)); return __result + (__last - __first); } @@ -133,7 +133,7 @@ namespace std inline void __uninitialized_fill_aux(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x, __true_type) - { fill(__first, __last, __x); } + { std::fill(__first, __last, __x); } template void @@ -143,11 +143,11 @@ namespace std _ForwardIterator __cur = __first; try { for ( ; __cur != __last; ++__cur) - _Construct(&*__cur, __x); + std::_Construct(&*__cur, __x); } catch(...) { - _Destroy(__first, __cur); + std::_Destroy(__first, __cur); __throw_exception_again; } } @@ -167,7 +167,7 @@ namespace std { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD; - __uninitialized_fill_aux(__first, __last, __x, _Is_POD()); + std::__uninitialized_fill_aux(__first, __last, __x, _Is_POD()); } // Valid if copy construction is equivalent to assignment, and if the @@ -177,7 +177,7 @@ namespace std __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n, const _Tp& __x, __true_type) { - return fill_n(__first, __n, __x); + return std::fill_n(__first, __n, __x); } template @@ -188,12 +188,12 @@ namespace std _ForwardIterator __cur = __first; try { for ( ; __n > 0; --__n, ++__cur) - _Construct(&*__cur, __x); + std::_Construct(&*__cur, __x); return __cur; } catch(...) { - _Destroy(__first, __cur); + std::_Destroy(__first, __cur); __throw_exception_again; } } @@ -213,7 +213,7 @@ namespace std { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD; - return __uninitialized_fill_n_aux(__first, __n, __x, _Is_POD()); + return std::__uninitialized_fill_n_aux(__first, __n, __x, _Is_POD()); } // Extensions: __uninitialized_copy_copy, __uninitialized_copy_fill, @@ -230,13 +230,13 @@ namespace std _InputIterator2 __first2, _InputIterator2 __last2, _ForwardIterator __result) { - _ForwardIterator __mid = uninitialized_copy(__first1, __last1, __result); + _ForwardIterator __mid = std::uninitialized_copy(__first1, __last1, __result); try { - return uninitialized_copy(__first2, __last2, __mid); + return std::uninitialized_copy(__first2, __last2, __mid); } catch(...) { - _Destroy(__result, __mid); + std::_Destroy(__result, __mid); __throw_exception_again; } } @@ -250,13 +250,13 @@ namespace std const _Tp& __x, _InputIterator __first, _InputIterator __last) { - uninitialized_fill(__result, __mid, __x); + std::uninitialized_fill(__result, __mid, __x); try { - return uninitialized_copy(__first, __last, __mid); + return std::uninitialized_copy(__first, __last, __mid); } catch(...) { - _Destroy(__result, __mid); + std::_Destroy(__result, __mid); __throw_exception_again; } } @@ -270,13 +270,13 @@ namespace std _ForwardIterator __first2, _ForwardIterator __last2, const _Tp& __x) { - _ForwardIterator __mid2 = uninitialized_copy(__first1, __last1, __first2); + _ForwardIterator __mid2 = std::uninitialized_copy(__first1, __last1, __first2); try { - uninitialized_fill(__mid2, __last2, __x); + std::uninitialized_fill(__mid2, __last2, __x); } catch(...) { - _Destroy(__first2, __mid2); + std::_Destroy(__first2, __mid2); __throw_exception_again; } } diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h index bbd2edb8bb6..91a6d9ba9ab 100644 --- a/libstdc++-v3/include/bits/stl_vector.h +++ b/libstdc++-v3/include/bits/stl_vector.h @@ -239,7 +239,7 @@ namespace std vector(size_type __n, const value_type& __value, const allocator_type& __a = allocator_type()) : _Base(__n, __a) - { this->_M_finish = uninitialized_fill_n(this->_M_start, __n, __value); } + { this->_M_finish = std::uninitialized_fill_n(this->_M_start, __n, __value); } /** * @brief Create a %vector with default elements. @@ -251,8 +251,8 @@ namespace std explicit vector(size_type __n) : _Base(__n, allocator_type()) - { this->_M_finish = uninitialized_fill_n(this->_M_start, - __n, value_type()); } + { this->_M_finish = std::uninitialized_fill_n(this->_M_start, + __n, value_type()); } /** * @brief %Vector copy constructor. @@ -265,8 +265,8 @@ namespace std */ vector(const vector& __x) : _Base(__x.size(), __x.get_allocator()) - { this->_M_finish = uninitialized_copy(__x.begin(), __x.end(), - this->_M_start); + { this->_M_finish = std::uninitialized_copy(__x.begin(), __x.end(), + this->_M_start); } /** @@ -298,7 +298,7 @@ namespace std * themselves are pointers, the pointed-to memory is not touched in any * way. Managing the pointer is the user's responsibilty. */ - ~vector() { _Destroy(this->_M_start, this->_M_finish); } + ~vector() { std::_Destroy(this->_M_start, this->_M_finish); } /** * @brief %Vector assignment operator. @@ -600,7 +600,7 @@ namespace std { if (this->_M_finish != this->_M_end_of_storage) { - _Construct(this->_M_finish, __x); + std::_Construct(this->_M_finish, __x); ++this->_M_finish; } else @@ -619,7 +619,7 @@ namespace std pop_back() { --this->_M_finish; - _Destroy(this->_M_finish); + std::_Destroy(this->_M_finish); } /** @@ -756,7 +756,7 @@ namespace std pointer __result = _M_allocate(__n); try { - uninitialized_copy(__first, __last, __result); + std::uninitialized_copy(__first, __last, __result); return __result; } catch(...) @@ -776,7 +776,7 @@ namespace std { this->_M_start = _M_allocate(__n); this->_M_end_of_storage = this->_M_start + __n; - this->_M_finish = uninitialized_fill_n(this->_M_start, __n, __value); + this->_M_finish = std::uninitialized_fill_n(this->_M_start, __n, __value); } // Called by the range constructor to implement [23.1.1]/9 @@ -809,8 +809,8 @@ namespace std size_type __n = std::distance(__first, __last); this->_M_start = _M_allocate(__n); this->_M_end_of_storage = this->_M_start + __n; - this->_M_finish = uninitialized_copy(__first, __last, - this->_M_start); + this->_M_finish = std::uninitialized_copy(__first, __last, + this->_M_start); } @@ -915,7 +915,7 @@ namespace std operator==(const vector<_Tp,_Alloc>& __x, const vector<_Tp,_Alloc>& __y) { return __x.size() == __y.size() && - equal(__x.begin(), __x.end(), __y.begin()); + std::equal(__x.begin(), __x.end(), __y.begin()); } /** @@ -933,8 +933,8 @@ namespace std inline bool operator<(const vector<_Tp,_Alloc>& __x, const vector<_Tp,_Alloc>& __y) { - return lexicographical_compare(__x.begin(), __x.end(), - __y.begin(), __y.end()); + return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); } /// Based on operator== diff --git a/libstdc++-v3/include/ext/rope b/libstdc++-v3/include/ext/rope index 9ba261845b3..9cb0d68b3ef 100644 --- a/libstdc++-v3/include/ext/rope +++ b/libstdc++-v3/include/ext/rope @@ -50,15 +50,14 @@ #define _ROPE 1 #include +#include +#include #include #include #include #include -#include -#include #include - # ifdef __GC # define __GC_CONST const # else