Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / interprocess / example / doc_shared_ptr.cpp
index e44eb05..6956816 100644 (file)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2006-2011.
+// (C) Copyright Ion Gaztanaga 2006-2012.
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
@@ -94,7 +94,9 @@ int main ()
       assert(owner1->shared_ptr_.use_count() == 2);
       assert(owner2->shared_ptr_.use_count() == 2);
       assert(owner1->shared_ptr_.get() == owner2->shared_ptr_.get());
-
+      //<-
+      (void)owner2;
+      //->
       //The mapped file is unmapped here. Objects have been flushed to disk
    }
    {
@@ -128,11 +130,11 @@ int main ()
       //Now destroy the remaining owner. "object to share" will be destroyed
       file.destroy_ptr(owner2);
       assert(file.find<type_to_share>("object to share").first == 0);
-    
+
       //Test observer
       assert(local_observer1.expired());
       assert(local_observer1.use_count() == 0);
-    
+
       //The reference count will be deallocated when all weak pointers
       //disappear. After that, the file is unmapped.
    }