From: François Dumont Date: Mon, 18 Dec 2017 21:59:17 +0000 (+0000) Subject: re PR libstdc++/80761 (std::set::insert_return_type uses wrong iterator type) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=adaefe2a50b56505b9745955da5231cd87ce9d8a;p=gcc.git re PR libstdc++/80761 (std::set::insert_return_type uses wrong iterator type) 2017-11-20 François Dumont 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 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 08096d10e7c..2a99643feec 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,16 @@ +2017-11-20 François Dumont + + 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 PR libstdc++/68430 diff --git a/libstdc++-v3/include/debug/map.h b/libstdc++-v3/include/debug/map.h index d5a2c9f6e6f..f769b501b58 100644 --- a/libstdc++-v3/include/debug/map.h +++ b/libstdc++-v3/include/debug/map.h @@ -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; 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 diff --git a/libstdc++-v3/include/debug/set.h b/libstdc++-v3/include/debug/set.h index 5353cfe87b2..4466bfc98e8 100644 --- a/libstdc++-v3/include/debug/set.h +++ b/libstdc++-v3/include/debug/set.h @@ -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; 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 diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map index c68ccaa3372..0ed9922c5bf 100644 --- a/libstdc++-v3/include/debug/unordered_map +++ b/libstdc++-v3/include/debug/unordered_map @@ -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; 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 diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set index 1fe493fe52f..1f8e95f6c22 100644 --- a/libstdc++-v3/include/debug/unordered_set +++ b/libstdc++-v3/include/debug/unordered_set @@ -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; 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