re PR libstdc++/80761 (std::set<T,C,A>::insert_return_type uses wrong iterator type)

2017-11-20  François Dumont  <fdumont@gcc.gnu.org>

	PR libstdc++/80761
	* include/debug/map.h
	(std::__debug::map<>::insert_return_type): Define using
	_Node_insert_return.
	* include/debug/set.h (std::__debug::set<>::insert_return_type):
	Likewise.
	* include/debug/unordered_map:
	(std::__debug::unordered_map<>::insert_return_type): Likewise.
	* include/debug/unordered_set:
	(std::__debug::unordered_set<>::insert_return_type): Likewise.

From-SVN: r255789
This commit is contained in:
François Dumont 2017-12-18 21:59:17 +00:00
parent 4a58d2fe83
commit adaefe2a50
5 changed files with 21 additions and 32 deletions

View File

@ -1,3 +1,16 @@
2017-11-20 François Dumont <fdumont@gcc.gnu.org>
PR libstdc++/80761
* include/debug/map.h
(std::__debug::map<>::insert_return_type): Define using
_Node_insert_return.
* include/debug/set.h (std::__debug::set<>::insert_return_type):
Likewise.
* include/debug/unordered_map:
(std::__debug::unordered_map<>::insert_return_type): Likewise.
* include/debug/unordered_set:
(std::__debug::unordered_set<>::insert_return_type): Likewise.
2017-12-18 Ville Voutilainen <ville.voutilainen@gmail.com>
PR libstdc++/68430

View File

@ -401,13 +401,7 @@ namespace __debug
#if __cplusplus > 201402L
using node_type = typename _Base::node_type;
struct insert_return_type
{
bool inserted;
iterator position;
node_type node;
};
using insert_return_type = _Node_insert_return<iterator, node_type>;
node_type
extract(const_iterator __position)
@ -431,7 +425,7 @@ namespace __debug
{
auto __ret = _Base::insert(std::move(__nh));
iterator __pos = iterator(__ret.position, this);
return { __ret.inserted, __pos, std::move(__ret.node) };
return { __pos, __ret.inserted, std::move(__ret.node) };
}
iterator

View File

@ -298,13 +298,7 @@ namespace __debug
#if __cplusplus > 201402L
using node_type = typename _Base::node_type;
struct insert_return_type
{
bool inserted;
iterator position;
node_type node;
};
using insert_return_type = _Node_insert_return<iterator, node_type>;
node_type
extract(const_iterator __position)
@ -328,7 +322,7 @@ namespace __debug
{
auto __ret = _Base::insert(std::move(__nh));
iterator __pos = iterator(__ret.position, this);
return { __ret.inserted, __pos, std::move(__ret.node) };
return { __pos, __ret.inserted, std::move(__ret.node) };
}
iterator

View File

@ -462,13 +462,7 @@ namespace __debug
#if __cplusplus > 201402L
using node_type = typename _Base::node_type;
struct insert_return_type
{
bool inserted;
iterator position;
node_type node;
};
using insert_return_type = _Node_insert_return<iterator, node_type>;
node_type
extract(const_iterator __position)
@ -499,7 +493,7 @@ namespace __debug
{
auto __ret = _Base::insert(std::move(__nh));
iterator __pos = iterator(__ret.position, this);
return { __ret.inserted, __pos, std::move(__ret.node) };
return { __pos, __ret.inserted, std::move(__ret.node) };
}
iterator

View File

@ -372,13 +372,7 @@ namespace __debug
#if __cplusplus > 201402L
using node_type = typename _Base::node_type;
struct insert_return_type
{
bool inserted;
iterator position;
node_type node;
};
using insert_return_type = _Node_insert_return<iterator, node_type>;
node_type
extract(const_iterator __position)
@ -409,7 +403,7 @@ namespace __debug
{
auto __ret = _Base::insert(std::move(__nh));
iterator __pos = iterator(__ret.position, this);
return { __ret.inserted, __pos, std::move(__ret.node) };
return { __pos, __ret.inserted, std::move(__ret.node) };
}
iterator