Changed: use padding option instead of alignment one
[libcds.git] / cds / intrusive / details / single_link_struct.h
index 5a2758e0b15e13e900e64c4822160ff9e67f13f1..b235b593e7775c798ec6cda434c20aa1f9d1cdd9 100644 (file)
@@ -1,7 +1,7 @@
 //$$CDS-header$$
 
-#ifndef __CDS_INTRUSIVE_DETAILS_SINGLE_LINK_STRUCT_H
-#define __CDS_INTRUSIVE_DETAILS_SINGLE_LINK_STRUCT_H
+#ifndef CDSLIB_INTRUSIVE_DETAILS_SINGLE_LINK_STRUCT_H
+#define CDSLIB_INTRUSIVE_DETAILS_SINGLE_LINK_STRUCT_H
 
 #include <cds/intrusive/details/base.h>
 #include <cds/gc/default_gc.h>
@@ -36,9 +36,10 @@ namespace cds { namespace intrusive {
 
             atomic_node_ptr m_pNext ; ///< pointer to the next node in the container
 
-            node()
-                : m_pNext( nullptr )
-            {}
+            node() CDS_NOEXCEPT
+            {
+                m_pNext.store( nullptr, atomics::memory_order_release );
+            }
         };
 
         //@cond
@@ -164,4 +165,4 @@ namespace cds { namespace intrusive {
 
 
 
-#endif // #ifndef __CDS_INTRUSIVE_DETAILS_SINGLE_LINK_STRUCT_H
+#endif // #ifndef CDSLIB_INTRUSIVE_DETAILS_SINGLE_LINK_STRUCT_H