From 522f5d0d932b03630590f8dc2fb459d8154900d3 Mon Sep 17 00:00:00 2001
From: Ernest Galbrun <ernest.galbrun@univ-lorraine.fr>
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
|
b
|
namespace boost {
|
296 | 296 | const Property& p = Property()) |
297 | 297 | : stored_edge<Vertex>(target), m_property(new Property(p)) { } |
298 | 298 | #if defined(BOOST_MSVC) |
299 | | inline stored_edge_property(self&& x) {std::swap(m_property, x.m_property);}; |
300 | | inline stored_edge_property(self const& x) {std::swap(m_property, const_cast<self&>(x).m_property);}; |
301 | | inline self& operator=(self&& x) { std::swap(m_property, x.m_property); return *this;}; |
302 | | inline self& operator=(self& x) { std::swap(m_property, x.m_property); return *this;}; |
| 299 | inline stored_edge_property(self&& x) { |
| 300 | std::swap(m_property, x.m_property); |
| 301 | m_target = x.m_target; |
| 302 | }; |
| 303 | inline stored_edge_property(self const& x) { |
| 304 | std::swap(m_property, const_cast<self&>(x).m_property); |
| 305 | m_target = x.m_target; |
| 306 | }; |
| 307 | inline self& operator=(self&& x) { |
| 308 | std::swap(m_property, x.m_property); |
| 309 | m_target = x.m_target; |
| 310 | return *this; |
| 311 | }; |
| 312 | inline self& operator=(self& x) { |
| 313 | std::swap(m_property, x.m_property); |
| 314 | m_target = x.m_target; |
| 315 | return *this; |
| 316 | }; |
303 | 317 | #else |
304 | 318 | stored_edge_property(self&& x) = default; |
305 | 319 | self& operator=(self&& x) = default; |