From 52b42b4e485d166f719e115d55855c31b8f27948 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Thu, 8 Aug 2013 20:27:40 +0000 Subject: [PATCH] Fix unused variable warning. Refs #8851. Bit annoying that `boost::ignore_unused_variable_warning` is in ``. [SVN r85244] --- include/boost/unordered/detail/table.hpp | 2 ++ include/boost/unordered/detail/util.hpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/boost/unordered/detail/table.hpp b/include/boost/unordered/detail/table.hpp index 84d1183d..99f2e4bb 100644 --- a/include/boost/unordered/detail/table.hpp +++ b/include/boost/unordered/detail/table.hpp @@ -456,6 +456,8 @@ namespace boost { namespace unordered { namespace detail { void swap_allocators(table& other, false_type) { + boost::unordered::detail::ignore_unused_variable_warning(other); + // According to 23.2.1.8, if propagate_on_container_swap is // false the behaviour is undefined unless the allocators // are equal. diff --git a/include/boost/unordered/detail/util.hpp b/include/boost/unordered/detail/util.hpp index a901477d..325124a7 100644 --- a/include/boost/unordered/detail/util.hpp +++ b/include/boost/unordered/detail/util.hpp @@ -28,6 +28,8 @@ namespace boost { namespace unordered { namespace detail { struct move_tag {}; struct empty_emplace {}; + template inline void ignore_unused_variable_warning(T const&) {} + //////////////////////////////////////////////////////////////////////////// // iterator SFINAE