From 522f5d0d932b03630590f8dc2fb459d8154900d3 Mon Sep 17 00:00:00 2001 From: Ernest Galbrun Date: Tue, 1 Jul 2014 16:25:27 +0200 Subject: [PATCH] changed the copy from rvalue reference to copy m_taarget as well as m_property --- include/boost/graph/detail/adjacency_list.hpp | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/include/boost/graph/detail/adjacency_list.hpp b/include/boost/graph/detail/adjacency_list.hpp index c9c8f2e..80c10fb 100644 --- a/include/boost/graph/detail/adjacency_list.hpp +++ b/include/boost/graph/detail/adjacency_list.hpp @@ -296,10 +296,24 @@ namespace boost { const Property& p = Property()) : stored_edge(target), m_property(new Property(p)) { } #if defined(BOOST_MSVC) - inline stored_edge_property(self&& x) {std::swap(m_property, x.m_property);}; - inline stored_edge_property(self const& x) {std::swap(m_property, const_cast(x).m_property);}; - inline self& operator=(self&& x) { std::swap(m_property, x.m_property); return *this;}; - inline self& operator=(self& x) { std::swap(m_property, x.m_property); return *this;}; + inline stored_edge_property(self&& x) { + std::swap(m_property, x.m_property); + m_target = x.m_target; + }; + inline stored_edge_property(self const& x) { + std::swap(m_property, const_cast(x).m_property); + m_target = x.m_target; + }; + inline self& operator=(self&& x) { + std::swap(m_property, x.m_property); + m_target = x.m_target; + return *this; + }; + inline self& operator=(self& x) { + std::swap(m_property, x.m_property); + m_target = x.m_target; + return *this; + }; #else stored_edge_property(self&& x) = default; self& operator=(self&& x) = default; -- 1.9.4.msysgit.0