From 3bb2568fad345116afccbf23aaaf6c556e77c121 Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Sun, 16 Sep 2007 09:33:34 +0000 Subject: [PATCH] Visual C++ 7.1 ICE workaround by Ralf W. Grosse-Kunstleve added to ~const_T_base() as well. See also Boost Developers mailing list, subject "utility/value_init.hpp: VC 7.1 ICE & workaround" [SVN r39308] --- include/boost/utility/value_init.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/utility/value_init.hpp b/include/boost/utility/value_init.hpp index adac8bc..4cd8e1b 100644 --- a/include/boost/utility/value_init.hpp +++ b/include/boost/utility/value_init.hpp @@ -46,7 +46,11 @@ class const_T_base new (&x) T(); } - ~const_T_base() { get().T::~T(); } + ~const_T_base() + { + void const * ptr = &x; + static_cast(ptr)->T::~T(); + } T & get() const {