2010-01-03 Paolo Carlini <paolo.carlini@oracle.com>
+ * include/tr1_impl/hashtable (_Hashtable<>): Remove insert_return_type
+ typedef.
+ * include/profile/unordered_map (unordered_map<>::insert(const
+ value_type&), unordered_multimap<>::insert(const value_type&)): Adjust.
+ * include/profile/unordered_set (unordered_set<>::insert(const
+ value_type&), unordered_multimap<>::insert(const value_type&)):
+ Likewise.
+
+2010-01-03 Paolo Carlini <paolo.carlini@oracle.com>
+
* include/bits/stl_pair.h (pair<>::pair(_U1&&, const _T2&),
pair<>::pair(const _T1&, _U2&&), pair<>::pair(_U1&&, _U2&&)):
Use std::is_constructible instead of std::is_convertible.
// Profiling unordered_map/unordered_multimap implementation -*- C++ -*-
-// Copyright (C) 2009 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010 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
typedef typename _Base::reference reference;
typedef typename _Base::const_reference const_reference;
typedef typename _Base::mapped_type mapped_type;
- typedef std::pair<typename _Base::iterator, bool> pair_type;
- typedef typename _Base::insert_return_type insert_return_type;
typedef typename _Base::iterator iterator;
typedef typename _Base::const_iterator const_iterator;
~unordered_map()
{
- __profcxx_hashtable_destruct(this, _Base::bucket_count(), _Base::size());
+ __profcxx_hashtable_destruct(this, _Base::bucket_count(),
+ _Base::size());
_M_profile_destruct();
}
void
clear()
{
- __profcxx_hashtable_destruct(this, _Base::bucket_count(), _Base::size());
+ __profcxx_hashtable_destruct(this, _Base::bucket_count(),
+ _Base::size());
_M_profile_destruct();
_Base::clear();
}
_M_profile_resize(__old_size, _Base::bucket_count());
}
- insert_return_type
+ std::pair<iterator, bool>
insert(const value_type& __obj)
{
size_type __old_size = _Base::bucket_count();
- insert_return_type __res = _Base::insert(__obj);
+ std::pair<iterator, bool> __res = _Base::insert(__obj);
_M_profile_resize(__old_size, _Base::bucket_count());
return __res;
}
+
iterator
insert(iterator __iter, const value_type& __v)
{
typedef typename _Base::difference_type difference_type;
typedef typename _Base::reference reference;
typedef typename _Base::const_reference const_reference;
- typedef std::pair<typename _Base::iterator, bool> pair_type;
- typedef typename _Base::insert_return_type insert_return_type;
typedef typename _Base::iterator iterator;
typedef typename _Base::const_iterator const_iterator;
_M_profile_resize(__old_size, _Base::bucket_count());
}
- insert_return_type
+ iterator
insert(const value_type& __obj)
{
size_type __old_size = _Base::bucket_count();
- insert_return_type __res = _Base::insert(__obj);
+ iterator __res = _Base::insert(__obj);
_M_profile_resize(__old_size, _Base::bucket_count());
return __res;
}
+
iterator
insert(iterator __iter, const value_type& __v)
{
// Profiling unordered_set/unordered_multiset implementation -*- C++ -*-
-// Copyright (C) 2009 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010 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
typedef typename _Base::difference_type difference_type;
typedef typename _Base::reference reference;
typedef typename _Base::const_reference const_reference;
- typedef typename _Base::insert_return_type insert_return_type;
typedef typename _Base::iterator iterator;
typedef typename _Base::const_iterator const_iterator;
_M_profile_destruct();
_Base::clear();
}
+
void
insert(std::initializer_list<value_type> __l)
{
_Base::insert(__l);
_M_profile_resize(__old_size, _Base::bucket_count());
}
- insert_return_type insert(const value_type& __obj)
+
+ std::pair<iterator, bool>
+ insert(const value_type& __obj)
{
size_type __old_size = _Base::bucket_count();
- insert_return_type __res = _Base::insert(__obj);
+ std::pair<iterator, bool> __res = _Base::insert(__obj);
_M_profile_resize(__old_size, _Base::bucket_count());
return __res;
}
+
iterator
insert(iterator __iter, const value_type& __v)
{
_Base::rehash(__n);
_M_profile_resize(__old_size, _Base::bucket_count());
}
+
private:
_Base&
_M_base() { return *this; }
typedef typename _Base::difference_type difference_type;
typedef typename _Base::reference reference;
typedef typename _Base::const_reference const_reference;
- typedef typename _Base::insert_return_type insert_return_type;
typedef typename _Base::iterator iterator;
typedef typename _Base::const_iterator const_iterator;
_M_profile_destruct();
_Base::clear();
}
+
void
insert(std::initializer_list<value_type> __l)
{
_Base::insert(__l);
_M_profile_resize(__old_size, _Base::bucket_count());
}
- insert_return_type insert(const value_type& __obj)
+
+ iterator
+ insert(const value_type& __obj)
{
size_type __old_size = _Base::bucket_count();
- insert_return_type __res = _Base::insert(__obj);
+ iterator __res = _Base::insert(__obj);
_M_profile_resize(__old_size, _Base::bucket_count());
return __res;
}
+
iterator
insert(iterator __iter, const value_type& __v)
{
_Base::rehash(__n);
_M_profile_resize(__old_size, _Base::bucket_count());
}
+
private:
_Base&
_M_base() { return *this; }
// Internal header for TR1 unordered_set and unordered_map -*- C++ -*-
-// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008, 2009, 2010 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
_M_erase_node(_Node*, _Node**);
public:
- // Expose insert_return_type for profiling mode.
- typedef _Insert_Return_Type insert_return_type;
-
// Insert and erase
_Insert_Return_Type
insert(const value_type& __v)