Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r79651 - trunk/libs/unordered/test/objects
From: dnljms_at_[hidden]
Date: 2012-07-22 03:14:42


Author: danieljames
Date: 2012-07-22 03:14:42 EDT (Sun, 22 Jul 2012)
New Revision: 79651
URL: http://svn.boost.org/trac/boost/changeset/79651

Log:
Unordered: Avoid an MSVC warning.
Text files modified:
   trunk/libs/unordered/test/objects/test.hpp | 7 ++++++-
   1 files changed, 6 insertions(+), 1 deletions(-)

Modified: trunk/libs/unordered/test/objects/test.hpp
==============================================================================
--- trunk/libs/unordered/test/objects/test.hpp (original)
+++ trunk/libs/unordered/test/objects/test.hpp 2012-07-22 03:14:42 EDT (Sun, 22 Jul 2012)
@@ -26,7 +26,9 @@
     template <class T> class allocator2;
     object generate(object const*);
     implicitly_convertible generate(implicitly_convertible const*);
-
+
+ inline void ignore_variable(void const*) {}
+
     class object : private counted_object
     {
         friend class hash;
@@ -248,6 +250,9 @@
         void destroy(T* p) {
             //detail::tracker.track_destroy((void*) p, sizeof(T), tag_);
             p->~T();
+
+ // Work around MSVC buggy unused parameter warning.
+ ignore_variable(&p);
         }
 
         bool operator==(allocator1 const& x) const


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk