forked from OSchip/llvm-project
Add two missing members from the extension hash containers. The first is
the type name 'data_type', which is specified by the SGI spec as being the correct type name for the mapped type. The second is an overload of insert found in standard containers, taking an iterator as a 'hint' (which we ignore in the standard containers as well). libstdc++'s implementation includes these overloads, and they are needed to make insert_iterator work (which I suspect is the real motivation for including them in the standard containers). The motivation for including these overloads of insert and leaving the mapped_type typedef is to make it easier for clients to migrate to the standard containers. llvm-svn: 136538
This commit is contained in:
parent
d451ea9ca9
commit
fe473ae277
|
@ -468,6 +468,7 @@ public:
|
|||
// types
|
||||
typedef _Key key_type;
|
||||
typedef _Tp mapped_type;
|
||||
typedef _Tp data_type;
|
||||
typedef _Hash hasher;
|
||||
typedef _Pred key_equal;
|
||||
typedef _Alloc allocator_type;
|
||||
|
@ -551,6 +552,8 @@ public:
|
|||
_LIBCPP_INLINE_VISIBILITY
|
||||
pair<iterator, bool> insert(const value_type& __x)
|
||||
{return __table_.__insert_unique(__x);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator insert(const_iterator, const value_type& __x) {return insert(__x).first;}
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __first, _InputIterator __last);
|
||||
|
||||
|
@ -744,6 +747,7 @@ public:
|
|||
// types
|
||||
typedef _Key key_type;
|
||||
typedef _Tp mapped_type;
|
||||
typedef _Tp data_type;
|
||||
typedef _Hash hasher;
|
||||
typedef _Pred key_equal;
|
||||
typedef _Alloc allocator_type;
|
||||
|
@ -825,6 +829,8 @@ public:
|
|||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator insert(const_iterator, const value_type& __x) {return insert(__x);}
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __first, _InputIterator __last);
|
||||
|
||||
|
|
|
@ -274,6 +274,8 @@ public:
|
|||
_LIBCPP_INLINE_VISIBILITY
|
||||
pair<iterator, bool> insert(const value_type& __x)
|
||||
{return __table_.__insert_unique(__x);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator insert(const_iterator, const value_type& __x) {return insert(__x).first;}
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __first, _InputIterator __last);
|
||||
|
||||
|
@ -492,6 +494,8 @@ public:
|
|||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
iterator insert(const_iterator, const value_type& __x) {return insert(__x);}
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __first, _InputIterator __last);
|
||||
|
||||
|
|
Loading…
Reference in New Issue