From 116272067b46c2c209b90e3eed25879b62e78cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sat, 12 Nov 2016 19:03:59 +0100 Subject: [PATCH] Fix error in nonhook_node due to missing copy-constructor and assignment implementstion --- test/nonhook_node.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/nonhook_node.hpp b/test/nonhook_node.hpp index 34fed1d..8e3d6d3 100644 --- a/test/nonhook_node.hpp +++ b/test/nonhook_node.hpp @@ -29,7 +29,7 @@ namespace intrusive{ template < typename NodeTraits, template class Node_Algorithms > struct nonhook_node_member : public NodeTraits::node { - typedef NodeTraits node_traits; + typedef NodeTraits node_traits; typedef typename node_traits::node node; typedef typename node_traits::node_ptr node_ptr; typedef typename node_traits::const_node_ptr const_node_ptr; @@ -43,13 +43,12 @@ struct nonhook_node_member : public NodeTraits::node nonhook_node_member(const nonhook_node_member& rhs) { BOOST_TEST(!rhs.is_linked()); - *this = rhs; + node_algorithms::init(pointer_traits::pointer_to(static_cast< node& >(*this))); } nonhook_node_member& operator = (const nonhook_node_member& rhs) { BOOST_TEST(!this->is_linked() && !rhs.is_linked()); - static_cast< node& >(*this) = rhs; return *this; }