Commit adaefe2a by François Dumont

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
parent 4a58d2fe
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> 2017-12-18 Ville Voutilainen <ville.voutilainen@gmail.com>
PR libstdc++/68430 PR libstdc++/68430
......
...@@ -401,13 +401,7 @@ namespace __debug ...@@ -401,13 +401,7 @@ namespace __debug
#if __cplusplus > 201402L #if __cplusplus > 201402L
using node_type = typename _Base::node_type; using node_type = typename _Base::node_type;
using insert_return_type = _Node_insert_return<iterator, node_type>;
struct insert_return_type
{
bool inserted;
iterator position;
node_type node;
};
node_type node_type
extract(const_iterator __position) extract(const_iterator __position)
...@@ -431,7 +425,7 @@ namespace __debug ...@@ -431,7 +425,7 @@ namespace __debug
{ {
auto __ret = _Base::insert(std::move(__nh)); auto __ret = _Base::insert(std::move(__nh));
iterator __pos = iterator(__ret.position, this); iterator __pos = iterator(__ret.position, this);
return { __ret.inserted, __pos, std::move(__ret.node) }; return { __pos, __ret.inserted, std::move(__ret.node) };
} }
iterator iterator
......
...@@ -298,13 +298,7 @@ namespace __debug ...@@ -298,13 +298,7 @@ namespace __debug
#if __cplusplus > 201402L #if __cplusplus > 201402L
using node_type = typename _Base::node_type; using node_type = typename _Base::node_type;
using insert_return_type = _Node_insert_return<iterator, node_type>;
struct insert_return_type
{
bool inserted;
iterator position;
node_type node;
};
node_type node_type
extract(const_iterator __position) extract(const_iterator __position)
...@@ -328,7 +322,7 @@ namespace __debug ...@@ -328,7 +322,7 @@ namespace __debug
{ {
auto __ret = _Base::insert(std::move(__nh)); auto __ret = _Base::insert(std::move(__nh));
iterator __pos = iterator(__ret.position, this); iterator __pos = iterator(__ret.position, this);
return { __ret.inserted, __pos, std::move(__ret.node) }; return { __pos, __ret.inserted, std::move(__ret.node) };
} }
iterator iterator
......
...@@ -462,13 +462,7 @@ namespace __debug ...@@ -462,13 +462,7 @@ namespace __debug
#if __cplusplus > 201402L #if __cplusplus > 201402L
using node_type = typename _Base::node_type; using node_type = typename _Base::node_type;
using insert_return_type = _Node_insert_return<iterator, node_type>;
struct insert_return_type
{
bool inserted;
iterator position;
node_type node;
};
node_type node_type
extract(const_iterator __position) extract(const_iterator __position)
...@@ -499,7 +493,7 @@ namespace __debug ...@@ -499,7 +493,7 @@ namespace __debug
{ {
auto __ret = _Base::insert(std::move(__nh)); auto __ret = _Base::insert(std::move(__nh));
iterator __pos = iterator(__ret.position, this); iterator __pos = iterator(__ret.position, this);
return { __ret.inserted, __pos, std::move(__ret.node) }; return { __pos, __ret.inserted, std::move(__ret.node) };
} }
iterator iterator
......
...@@ -372,13 +372,7 @@ namespace __debug ...@@ -372,13 +372,7 @@ namespace __debug
#if __cplusplus > 201402L #if __cplusplus > 201402L
using node_type = typename _Base::node_type; using node_type = typename _Base::node_type;
using insert_return_type = _Node_insert_return<iterator, node_type>;
struct insert_return_type
{
bool inserted;
iterator position;
node_type node;
};
node_type node_type
extract(const_iterator __position) extract(const_iterator __position)
...@@ -409,7 +403,7 @@ namespace __debug ...@@ -409,7 +403,7 @@ namespace __debug
{ {
auto __ret = _Base::insert(std::move(__nh)); auto __ret = _Base::insert(std::move(__nh));
iterator __pos = iterator(__ret.position, this); iterator __pos = iterator(__ret.position, this);
return { __ret.inserted, __pos, std::move(__ret.node) }; return { __pos, __ret.inserted, std::move(__ret.node) };
} }
iterator iterator
......
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