From 820ad024fee763eceea22faa26abf47df4df505b Mon Sep 17 00:00:00 2001 From: Jeremiah Willcock Date: Wed, 9 Jun 2010 00:47:51 +0000 Subject: [PATCH] Applied patch from #3618; fixes #3618 [SVN r62621] --- include/boost/function/function_base.hpp | 8 ++++++-- test/Jamfile.v2 | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/boost/function/function_base.hpp b/include/boost/function/function_base.hpp index e092f01..581aae3 100644 --- a/include/boost/function/function_base.hpp +++ b/include/boost/function/function_base.hpp @@ -318,11 +318,15 @@ namespace boost { new (reinterpret_cast(&out_buffer.data)) functor_type(*in_functor); if (op == move_functor_tag) { - reinterpret_cast(&in_buffer.data)->~Functor(); + functor_type* f = reinterpret_cast(&in_buffer.data); + (void)f; // suppress warning about the value of f not being used (MSVC) + f->~Functor(); } } else if (op == destroy_functor_tag) { // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type. - reinterpret_cast(&out_buffer.data)->~Functor(); + functor_type* f = reinterpret_cast(&out_buffer.data); + (void)f; // suppress warning about the value of f not being used (MSVC) + f->~Functor(); } else if (op == check_functor_type_tag) { const detail::sp_typeinfo& check_type = *out_buffer.type.type; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index ef4e0d1..68895fa 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -8,6 +8,7 @@ # For more information, see http://www.boost.org/ project + : requirements msvc:on : source-location $(BOOST_ROOT) ;