Commit 7ffb61d5 by Paolo Carlini Committed by Paolo Carlini

hash_map: Remove forward declaration of equality operator...

2006-09-21  Paolo Carlini  <pcarlini@suse.de>

	* include/ext/hash_map: Remove forward declaration of equality
	operator, not needed for friendship of all its instances.
	* include/ext/hash_set: Likewise.
	* include/bits/stl_set.h: Likewise for equality operator and
	operator less.
	* include/bits/stl_multiset.h: Likewise.
	* include/bits/stl_multimap.h: Likewise.
	* include/bits/stl_queue.h: Likewise.
	* include/bits/stl_stack.h: Likewise.
	* include/bits/streambuf_iterator.h: Likewise for copy.
	* include/std/std_streambuf.h: Likewise for __copy_aux and find.
	* include/tr1/boost_shared_ptr.h: Likewise for get_deleter.
	* include/tr1/random: Likewise, remove all forward declarations
	of inserters and extractors.

From-SVN: r117116
parent 6750b31e
2006-09-21 Paolo Carlini <pcarlini@suse.de>
* include/ext/hash_map: Remove forward declaration of equality
operator, not needed for friendship of all its instances.
* include/ext/hash_set: Likewise.
* include/bits/stl_set.h: Likewise for equality operator and
operator less.
* include/bits/stl_multiset.h: Likewise.
* include/bits/stl_multimap.h: Likewise.
* include/bits/stl_queue.h: Likewise.
* include/bits/stl_stack.h: Likewise.
* include/bits/streambuf_iterator.h: Likewise for copy.
* include/std/std_streambuf.h: Likewise for __copy_aux and find.
* include/tr1/boost_shared_ptr.h: Likewise for get_deleter.
* include/tr1/random: Likewise, remove all forward declarations
of inserters and extractors.
2006-09-21 Paolo Carlini <pcarlini@suse.de>
* include/ext/sso_string_base.h (__sso_string_base<>::_M_max_size(),
_M_destroy, _M_create): Use _M_get_allocator.
......
......@@ -65,23 +65,6 @@
_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// Forward declaration of operators < and ==, needed for friend declaration.
template <typename _Key, typename _Tp,
typename _Compare = std::less<_Key>,
typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
class multimap;
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
const multimap<_Key, _Tp, _Compare, _Alloc>& __y);
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
inline bool
operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
const multimap<_Key, _Tp, _Compare, _Alloc>& __y);
/**
* @brief A standard container made up of (key,value) pairs, which can be
* retrieved based on a key, in logarithmic time.
......@@ -103,7 +86,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* called (*_unique versus *_equal, same as the standard).
* @endif
*/
template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
template <typename _Key, typename _Tp,
typename _Compare = std::less<_Key>,
typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
class multimap
{
public:
......
......@@ -65,21 +65,6 @@
_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// Forward declaration of operators < and ==, needed for friend declaration.
template <class _Key, class _Compare = std::less<_Key>,
class _Alloc = std::allocator<_Key> >
class multiset;
template <class _Key, class _Compare, class _Alloc>
inline bool
operator==(const multiset<_Key, _Compare, _Alloc>& __x,
const multiset<_Key, _Compare, _Alloc>& __y);
template <class _Key, class _Compare, class _Alloc>
inline bool
operator<(const multiset<_Key, _Compare, _Alloc>& __x,
const multiset<_Key, _Compare, _Alloc>& __y);
/**
* @brief A standard container made up of elements, which can be retrieved
* in logarithmic time.
......@@ -100,7 +85,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* called (*_unique versus *_equal, same as the standard).
* @endif
*/
template <class _Key, class _Compare, class _Alloc>
template <class _Key, class _Compare = std::less<_Key>,
class _Alloc = std::allocator<_Key> >
class multiset
{
// concept requirements
......
......@@ -67,18 +67,6 @@
_GLIBCXX_BEGIN_NAMESPACE(std)
// Forward declarations of operators < and ==, needed for friend declaration.
template<typename _Tp, typename _Sequence = deque<_Tp> >
class queue;
template<typename _Tp, typename _Seq>
inline bool
operator==(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&);
template<typename _Tp, typename _Seq>
inline bool
operator<(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&);
/**
* @brief A standard container giving FIFO behavior.
*
......@@ -103,7 +91,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* which is a typedef for the second Sequence parameter, and @c push and
* @c pop, which are standard %queue/FIFO operations.
*/
template<typename _Tp, typename _Sequence>
template<typename _Tp, typename _Sequence = deque<_Tp> >
class queue
{
// concept requirements
......
......@@ -65,21 +65,6 @@
_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// Forward declarations of operators < and ==, needed for friend declaration.
template<class _Key, class _Compare = std::less<_Key>,
class _Alloc = std::allocator<_Key> >
class set;
template<class _Key, class _Compare, class _Alloc>
inline bool
operator==(const set<_Key, _Compare, _Alloc>& __x,
const set<_Key, _Compare, _Alloc>& __y);
template<class _Key, class _Compare, class _Alloc>
inline bool
operator<(const set<_Key, _Compare, _Alloc>& __x,
const set<_Key, _Compare, _Alloc>& __y);
/**
* @brief A standard container made up of unique keys, which can be
* retrieved in logarithmic time.
......@@ -103,7 +88,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
* called (*_unique versus *_equal, same as the standard).
* @endif
*/
template<class _Key, class _Compare, class _Alloc>
template<class _Key, class _Compare = std::less<_Key>,
class _Alloc = std::allocator<_Key> >
class set
{
// concept requirements
......
......@@ -67,19 +67,6 @@
_GLIBCXX_BEGIN_NAMESPACE(std)
// Forward declarations of operators == and <, needed for friend
// declaration.
template<typename _Tp, typename _Sequence = deque<_Tp> >
class stack;
template<typename _Tp, typename _Seq>
inline bool
operator==(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y);
template<typename _Tp, typename _Seq>
inline bool
operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y);
/**
* @brief A standard container giving FILO behavior.
*
......@@ -107,7 +94,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* push, @c pop, and @c top, which are standard %stack/FILO
* operations.
*/
template<typename _Tp, typename _Sequence>
template<typename _Tp, typename _Sequence = deque<_Tp> >
class stack
{
// concept requirements
......
......@@ -43,12 +43,6 @@
_GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT> >::__type
copy(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>,
ostreambuf_iterator<_CharT>);
// 24.5.3 Template class istreambuf_iterator
/// Provides input iterator semantics for streambufs.
template<typename _CharT, typename _Traits>
......
......@@ -72,23 +72,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(__gnu_cxx, _GLIBCXX_EXT)
using std::pair;
using std::_Select1st;
// Forward declaration of equality operator; needed for friend
// declaration.
template<class _Key, class _Tp, class _HashFn = hash<_Key>,
class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp> >
class hash_map;
template<class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
inline bool
operator==(const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&,
const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&);
/**
* This is an SGI extension.
* @ingroup SGIextensions
* @doctodo
*/
template<class _Key, class _Tp, class _HashFn, class _EqualKey, class _Alloc>
template<class _Key, class _Tp, class _HashFn = hash<_Key>,
class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp> >
class hash_map
{
private:
......@@ -295,25 +285,16 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(__gnu_cxx, _GLIBCXX_EXT)
hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
{ __hm1.swap(__hm2); }
// Forward declaration of equality operator; needed for friend declaration.
template<class _Key, class _Tp,
class _HashFn = hash<_Key>,
class _EqualKey = equal_to<_Key>,
class _Alloc = allocator<_Tp> >
class hash_multimap;
template<class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
inline bool
operator==(const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm1,
const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm2);
/**
* This is an SGI extension.
* @ingroup SGIextensions
* @doctodo
*/
template<class _Key, class _Tp, class _HashFn, class _EqualKey,
class _Alloc>
template<class _Key, class _Tp,
class _HashFn = hash<_Key>,
class _EqualKey = equal_to<_Key>,
class _Alloc = allocator<_Tp> >
class hash_multimap
{
// concept requirements
......
......@@ -72,24 +72,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(__gnu_cxx, _GLIBCXX_EXT)
using std::pair;
using std::_Identity;
// Forward declaration of equality operator; needed for friend
// declaration.
template<class _Value, class _HashFcn = hash<_Value>,
class _EqualKey = equal_to<_Value>,
class _Alloc = allocator<_Value> >
class hash_set;
template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
inline bool
operator==(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs1,
const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs2);
/**
* This is an SGI extension.
* @ingroup SGIextensions
* @doctodo
*/
template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
template<class _Value, class _HashFcn = hash<_Value>,
class _EqualKey = equal_to<_Value>,
class _Alloc = allocator<_Value> >
class hash_set
{
// concept requirements
......@@ -285,24 +275,16 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(__gnu_cxx, _GLIBCXX_EXT)
hash_set<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
{ __hs1.swap(__hs2); }
template<class _Value,
class _HashFcn = hash<_Value>,
class _EqualKey = equal_to<_Value>,
class _Alloc = allocator<_Value> >
class hash_multiset;
template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
inline bool
operator==(const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2);
/**
* This is an SGI extension.
* @ingroup SGIextensions
* @doctodo
*/
template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
template<class _Value,
class _HashFcn = hash<_Value>,
class _EqualKey = equal_to<_Value>,
class _Alloc = allocator<_Value> >
class hash_multiset
{
// concept requirements
......
......@@ -60,18 +60,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*,
basic_streambuf<_CharT, _Traits>*, bool&);
template<typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
_CharT*>::__type
__copy_aux(istreambuf_iterator<_CharT>,
istreambuf_iterator<_CharT>, _CharT*);
template<typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
istreambuf_iterator<_CharT> >::__type
find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>,
const _CharT&);
/**
* @brief The actual work of input and output (interface).
*
......
......@@ -483,11 +483,6 @@ template<_Lock_policy _Lp>
{ }
// Function get_deleter must be declared before friend declaration by
// shared_ptr.
template<typename _Del, typename _Tp, _Lock_policy _Lp>
_Del* get_deleter(const __shared_ptr<_Tp, _Lp>&);
/**
* @class shared_ptr <tr1/memory>
*
......
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