Commit 42a27024 by Paolo Carlini Committed by Paolo Carlini

stl_tree.h (_Rb_tree<>::insert_unique): Rename to _M_insert_unique.

2006-01-06  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_tree.h (_Rb_tree<>::insert_unique): Rename
	to _M_insert_unique.
	(_Rb_tree<>::insert_equal): Rename to _M_insert_equal.
	* include/bits/stl_map.h (class map<>): Update callers.
	* include/bits/stl_set.h (class set<>): Likewise.
	* include/bits/stl_multimap.h (class multimap<>): Likewise.
	* include/bits/stl_multiset.h (class multiset<>): Likewise.

From-SVN: r109424
parent 8479d5f1
2006-01-06 Paolo Carlini <pcarlini@suse.de> 2006-01-06 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_tree.h (_Rb_tree<>::insert_unique): Rename
to _M_insert_unique.
(_Rb_tree<>::insert_equal): Rename to _M_insert_equal.
* include/bits/stl_map.h (class map<>): Update callers.
* include/bits/stl_set.h (class set<>): Likewise.
* include/bits/stl_multimap.h (class multimap<>): Likewise.
* include/bits/stl_multiset.h (class multiset<>): Likewise.
2006-01-06 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_bvector.h (vector<bool>::erase(iterator, * include/bits/stl_bvector.h (vector<bool>::erase(iterator,
iterator)): Just use _M_erase_at_end. iterator)): Just use _M_erase_at_end.
......
// Map implementation -*- C++ -*- // Map implementation -*- C++ -*-
// Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -186,7 +186,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -186,7 +186,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
template <typename _InputIterator> template <typename _InputIterator>
map(_InputIterator __first, _InputIterator __last) map(_InputIterator __first, _InputIterator __last)
: _M_t(_Compare(), allocator_type()) : _M_t(_Compare(), allocator_type())
{ _M_t.insert_unique(__first, __last); } { _M_t._M_insert_unique(__first, __last); }
/** /**
* @brief Builds a %map from a range. * @brief Builds a %map from a range.
...@@ -203,7 +203,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -203,7 +203,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
map(_InputIterator __first, _InputIterator __last, map(_InputIterator __first, _InputIterator __last,
const _Compare& __comp, const allocator_type& __a = allocator_type()) const _Compare& __comp, const allocator_type& __a = allocator_type())
: _M_t(__comp, __a) : _M_t(__comp, __a)
{ _M_t.insert_unique(__first, __last); } { _M_t._M_insert_unique(__first, __last); }
// FIXME There is no dtor declared, but we should have something generated // FIXME There is no dtor declared, but we should have something generated
// by Doxygen. I don't know what tags to add to this paragraph to make // by Doxygen. I don't know what tags to add to this paragraph to make
...@@ -393,7 +393,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -393,7 +393,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
*/ */
std::pair<iterator,bool> std::pair<iterator,bool>
insert(const value_type& __x) insert(const value_type& __x)
{ return _M_t.insert_unique(__x); } { return _M_t._M_insert_unique(__x); }
/** /**
* @brief Attempts to insert a std::pair into the %map. * @brief Attempts to insert a std::pair into the %map.
...@@ -417,7 +417,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -417,7 +417,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
*/ */
iterator iterator
insert(iterator position, const value_type& __x) insert(iterator position, const value_type& __x)
{ return _M_t.insert_unique(position, __x); } { return _M_t._M_insert_unique(position, __x); }
/** /**
* @brief A template function that attemps to insert a range of elements. * @brief A template function that attemps to insert a range of elements.
...@@ -430,7 +430,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -430,7 +430,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
template <typename _InputIterator> template <typename _InputIterator>
void void
insert(_InputIterator __first, _InputIterator __last) insert(_InputIterator __first, _InputIterator __last)
{ _M_t.insert_unique(__first, __last); } { _M_t._M_insert_unique(__first, __last); }
/** /**
* @brief Erases an element from a %map. * @brief Erases an element from a %map.
......
// Multimap implementation -*- C++ -*- // Multimap implementation -*- C++ -*-
// Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -200,7 +200,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -200,7 +200,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
template <typename _InputIterator> template <typename _InputIterator>
multimap(_InputIterator __first, _InputIterator __last) multimap(_InputIterator __first, _InputIterator __last)
: _M_t(_Compare(), allocator_type()) : _M_t(_Compare(), allocator_type())
{ _M_t.insert_equal(__first, __last); } { _M_t._M_insert_equal(__first, __last); }
/** /**
* @brief Builds a %multimap from a range. * @brief Builds a %multimap from a range.
...@@ -218,7 +218,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -218,7 +218,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
const _Compare& __comp, const _Compare& __comp,
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _M_t(__comp, __a) : _M_t(__comp, __a)
{ _M_t.insert_equal(__first, __last); } { _M_t._M_insert_equal(__first, __last); }
// FIXME There is no dtor declared, but we should have something generated // FIXME There is no dtor declared, but we should have something generated
// by Doxygen. I don't know what tags to add to this paragraph to make // by Doxygen. I don't know what tags to add to this paragraph to make
...@@ -352,7 +352,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -352,7 +352,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
*/ */
iterator iterator
insert(const value_type& __x) insert(const value_type& __x)
{ return _M_t.insert_equal(__x); } { return _M_t._M_insert_equal(__x); }
/** /**
* @brief Inserts a std::pair into the %multimap. * @brief Inserts a std::pair into the %multimap.
...@@ -376,7 +376,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -376,7 +376,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
*/ */
iterator iterator
insert(iterator __position, const value_type& __x) insert(iterator __position, const value_type& __x)
{ return _M_t.insert_equal(__position, __x); } { return _M_t._M_insert_equal(__position, __x); }
/** /**
* @brief A template function that attemps to insert a range of elements. * @brief A template function that attemps to insert a range of elements.
...@@ -389,7 +389,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -389,7 +389,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
template <typename _InputIterator> template <typename _InputIterator>
void void
insert(_InputIterator __first, _InputIterator __last) insert(_InputIterator __first, _InputIterator __last)
{ _M_t.insert_equal(__first, __last); } { _M_t._M_insert_equal(__first, __last); }
/** /**
* @brief Erases an element from a %multimap. * @brief Erases an element from a %multimap.
......
// Multiset implementation -*- C++ -*- // Multiset implementation -*- C++ -*-
// Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -167,7 +167,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -167,7 +167,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
template <class _InputIterator> template <class _InputIterator>
multiset(_InputIterator __first, _InputIterator __last) multiset(_InputIterator __first, _InputIterator __last)
: _M_t(_Compare(), allocator_type()) : _M_t(_Compare(), allocator_type())
{ _M_t.insert_equal(__first, __last); } { _M_t._M_insert_equal(__first, __last); }
/** /**
* @brief Builds a %multiset from a range. * @brief Builds a %multiset from a range.
...@@ -185,7 +185,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -185,7 +185,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
const _Compare& __comp, const _Compare& __comp,
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _M_t(__comp, __a) : _M_t(__comp, __a)
{ _M_t.insert_equal(__first, __last); } { _M_t._M_insert_equal(__first, __last); }
/** /**
* @brief %Multiset copy constructor. * @brief %Multiset copy constructor.
...@@ -306,7 +306,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -306,7 +306,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
*/ */
iterator iterator
insert(const value_type& __x) insert(const value_type& __x)
{ return _M_t.insert_equal(__x); } { return _M_t._M_insert_equal(__x); }
/** /**
* @brief Inserts an element into the %multiset. * @brief Inserts an element into the %multiset.
...@@ -330,7 +330,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -330,7 +330,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
*/ */
iterator iterator
insert(iterator __position, const value_type& __x) insert(iterator __position, const value_type& __x)
{ return _M_t.insert_equal(__position, __x); } { return _M_t._M_insert_equal(__position, __x); }
/** /**
* @brief A template function that attemps to insert a range of elements. * @brief A template function that attemps to insert a range of elements.
...@@ -343,7 +343,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -343,7 +343,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
template <class _InputIterator> template <class _InputIterator>
void void
insert(_InputIterator __first, _InputIterator __last) insert(_InputIterator __first, _InputIterator __last)
{ _M_t.insert_equal(__first, __last); } { _M_t._M_insert_equal(__first, __last); }
/** /**
* @brief Erases an element from a %multiset. * @brief Erases an element from a %multiset.
......
// Set implementation -*- C++ -*- // Set implementation -*- C++ -*-
// Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -177,7 +177,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -177,7 +177,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
template<class _InputIterator> template<class _InputIterator>
set(_InputIterator __first, _InputIterator __last) set(_InputIterator __first, _InputIterator __last)
: _M_t(_Compare(), allocator_type()) : _M_t(_Compare(), allocator_type())
{ _M_t.insert_unique(__first, __last); } { _M_t._M_insert_unique(__first, __last); }
/** /**
* @brief Builds a %set from a range. * @brief Builds a %set from a range.
...@@ -195,7 +195,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -195,7 +195,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
const _Compare& __comp, const _Compare& __comp,
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _M_t(__comp, __a) : _M_t(__comp, __a)
{ _M_t.insert_unique(__first, __last); } { _M_t._M_insert_unique(__first, __last); }
/** /**
* @brief Set copy constructor. * @brief Set copy constructor.
...@@ -318,7 +318,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -318,7 +318,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
insert(const value_type& __x) insert(const value_type& __x)
{ {
std::pair<typename _Rep_type::iterator, bool> __p = std::pair<typename _Rep_type::iterator, bool> __p =
_M_t.insert_unique(__x); _M_t._M_insert_unique(__x);
return std::pair<iterator, bool>(__p.first, __p.second); return std::pair<iterator, bool>(__p.first, __p.second);
} }
...@@ -343,7 +343,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -343,7 +343,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
*/ */
iterator iterator
insert(iterator __position, const value_type& __x) insert(iterator __position, const value_type& __x)
{ return _M_t.insert_unique(__position, __x); } { return _M_t._M_insert_unique(__position, __x); }
/** /**
* @brief A template function that attemps to insert a range of elements. * @brief A template function that attemps to insert a range of elements.
...@@ -356,7 +356,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -356,7 +356,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
template<class _InputIterator> template<class _InputIterator>
void void
insert(_InputIterator __first, _InputIterator __last) insert(_InputIterator __first, _InputIterator __last)
{ _M_t.insert_unique(__first, __last); } { _M_t._M_insert_unique(__first, __last); }
/** /**
* @brief Erases an element from a %set. * @brief Erases an element from a %set.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment