Fix PR80183 : _M_color not moved
authorMarkus Trippelsdorf <markus@trippelsdorf.de>
Sun, 26 Mar 2017 12:33:35 +0000 (12:33 +0000)
committerMarkus Trippelsdorf <trippels@gcc.gnu.org>
Sun, 26 Mar 2017 12:33:35 +0000 (12:33 +0000)
PR libstdc++/80183
* include/bits/stl_tree.h:
(_Rb_tree_header::_M_move_data(_Rb_tree_header&)): Also save _M_color.

From-SVN: r246483

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_tree.h

index a3b6d6d74f05dc682ac3c315c3e960f57f4b89e8..d04a1f56facaea380207552adaaa4002b126e577 100644 (file)
@@ -1,3 +1,9 @@
+2017-03-26  Markus Trippelsdorf  <markus@trippelsdorf.de>
+
+       PR libstdc++/80183
+       * include/bits/stl_tree.h:
+       (_Rb_tree_header::_M_move_data(_Rb_tree_header&)): Also save _M_color.
+
 2017-03-23  Jonathan Wakely  <jwakely@redhat.com>
 
        * testsuite/23_containers/array/tuple_interface/
index cbcf7f2606fb03de9ec722f446181e0b5512df8c..ce7ecdaa87a747aad093002124fa69c474d74c77 100644 (file)
@@ -192,6 +192,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     void
     _M_move_data(_Rb_tree_header& __from)
     {
+      _M_header._M_color = __from._M_header._M_color;
       _M_header._M_parent = __from._M_header._M_parent;
       _M_header._M_left = __from._M_header._M_left;
       _M_header._M_right = __from._M_header._M_right;