Fixed Clang build
[libcds.git] / cds / gc / impl / hp_decl.h
index 354ac6a80d7dfbb9bfdaa1340331dfd54bcf67f4..0ecd01088145d99863bbfbb8a05e0539cfcac6dd 100644 (file)
@@ -5,7 +5,7 @@
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
-    
+
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions are met:
 
@@ -326,6 +326,11 @@ namespace cds { namespace gc {
                 m_guard = nullptr;
                 return g;
             }
+
+            hp::details::hp_guard*& guard_ref()
+            {
+                return m_guard;
+            }
             //@endcond
 
         private:
@@ -617,7 +622,7 @@ namespace cds { namespace gc {
             /// Move-assignment from \p Guard
             guarded_ptr& operator=( Guard&& g ) CDS_NOEXCEPT
             {
-                std::swap( m_pGuard, g.m_guard );
+                std::swap( m_pGuard, g.guard_ref() );
                 return *this;
             }