+2003-07-04 Paolo Carlini <pcarlini@unitus.it>
+
+ * 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 <bkoz@redhat.com>
* configure.host (fpos_include_dir): Fix.
{
_Node* __p = _M_get_node();
try {
- _Construct(&__p->_M_data, __x);
+ std::_Construct(&__p->_M_data, __x);
}
catch(...)
{
{
_Node* __p = _M_get_node();
try {
- _Construct(&__p->_M_data);
+ std::_Construct(&__p->_M_data);
}
catch(...)
{
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==
// 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
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.
: 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);
}
/**
try
{
c.push_back(__x);
- push_heap(c.begin(), c.end(), comp);
+ std::push_heap(c.begin(), c.end(), comp);
}
catch(...)
{
{
try
{
- pop_heap(c.begin(), c.end(), comp);
+ std::pop_heap(c.begin(), c.end(), comp);
c.pop_back();
}
catch(...)
raw_storage_iterator&
operator=(const _Tp& __element)
{
- _Construct(&*_M_iter, __element);
+ std::_Construct(&*_M_iter, __element);
return *this;
}
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:
}
~_Temporary_buffer() {
- _Destroy(_M_buffer, _M_buffer + _M_len);
+ std::_Destroy(_M_buffer, _M_buffer + _M_len);
free(_M_buffer);
}
{
_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);
void
destroy_node(_Link_type __p)
{
- _Destroy(&__p->_M_value_field);
+ std::_Destroy(&__p->_M_value_field);
_M_put_node(__p);
}
__uninitialized_copy_aux(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result,
__true_type)
- { return copy(__first, __last, __result); }
+ { return std::copy(__first, __last, __result); }
template<typename _InputIterator, typename _ForwardIterator>
_ForwardIterator
_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;
}
}
{
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);
}
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);
}
inline void
__uninitialized_fill_aux(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x, __true_type)
- { fill(__first, __last, __x); }
+ { std::fill(__first, __last, __x); }
template<typename _ForwardIterator, typename _Tp>
void
_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;
}
}
{
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
__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<typename _ForwardIterator, typename _Size, typename _Tp>
_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;
}
}
{
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,
_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;
}
}
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;
}
}
_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;
}
}
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.
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.
*/
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);
}
/**
* 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.
{
if (this->_M_finish != this->_M_end_of_storage)
{
- _Construct(this->_M_finish, __x);
+ std::_Construct(this->_M_finish, __x);
++this->_M_finish;
}
else
pop_back()
{
--this->_M_finish;
- _Destroy(this->_M_finish);
+ std::_Destroy(this->_M_finish);
}
/**
pointer __result = _M_allocate(__n);
try
{
- uninitialized_copy(__first, __last, __result);
+ std::uninitialized_copy(__first, __last, __result);
return __result;
}
catch(...)
{
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
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);
}
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());
}
/**
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==
#define _ROPE 1
#include <bits/stl_algobase.h>
+#include <bits/stl_construct.h>
+#include <bits/stl_uninitialized.h>
#include <bits/stl_algo.h>
#include <bits/stl_function.h>
#include <bits/stl_numeric.h>
#include <bits/allocator.h>
-#include <bits/stl_construct.h>
-#include <bits/stl_uninitialized.h>
#include <ext/hash_fun.h>
-
# ifdef __GC
# define __GC_CONST const
# else