diff --git a/include/loki/Allocator.h b/include/loki/Allocator.h index 40efc8d..3bab337 100644 --- a/include/loki/Allocator.h +++ b/include/loki/Allocator.h @@ -117,6 +117,10 @@ public: /// Destruct the object at pointer. void destroy( pointer p ) { + // If the Type has no destructor, then some compilers complain about + // an unreferenced parameter, so use the void cast trick to prevent + // spurious warnings. + (void)p; p->~Type(); }