Ticket #11164: fix_stored_edge_property.patch
File fix_stored_edge_property.patch, 1.5 KB (added by , 8 years ago) |
---|
-
(a) adjacency_list.hpp.old vs. (b) /usr/include/boost/graph/detail/adjacency_list.hpp
a b namespace boost { 296 296 inline stored_edge_property(Vertex target, 297 297 const Property& p = Property()) 298 298 : stored_edge<Vertex>(target), m_property(new Property(p)) { } 299 #if defined(BOOST_MSVC) || (defined(BOOST_GCC) && (BOOST_GCC / 100) < 410)300 stored_edge_property(self&& x) : Base(static_cast< Base const& >(x)) {301 m_property.swap(x.m_property);302 }303 299 stored_edge_property(self const& x) : Base(static_cast< Base const& >(x)) { 304 300 m_property.swap(const_cast<self&>(x).m_property); 305 301 } 306 self& operator=(self && x) {302 self& operator=(self const& x) { 307 303 Base::operator=(static_cast< Base const& >(x)); 308 m_property = std::move( x.m_property);304 m_property = std::move(const_cast<self&>(x).m_property); 309 305 return *this; 310 306 } 311 self& operator=(self const& x) { 307 #if defined(BOOST_MSVC) || (defined(BOOST_GCC) && (BOOST_GCC / 100) < 410) 308 stored_edge_property(self&& x) : Base(static_cast< Base const& >(x)) { 309 m_property.swap(x.m_property); 310 } 311 self& operator=(self&& x) { 312 312 Base::operator=(static_cast< Base const& >(x)); 313 m_property = std::move( const_cast<self&>(x).m_property);313 m_property = std::move(x.m_property); 314 314 return *this; 315 315 } 316 316 #else