From 75cd88112c2d976282bcbf0694a6b90b1b148839 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 15 May 2006 13:56:27 +0000 Subject: [PATCH] Workaround for MSVC 8.0 managed/unmanaged mismatch (reported by Loic Joly) [SVN r33968] --- include/boost/shared_ptr.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/boost/shared_ptr.hpp b/include/boost/shared_ptr.hpp index bab848d..b1868fe 100644 --- a/include/boost/shared_ptr.hpp +++ b/include/boost/shared_ptr.hpp @@ -330,6 +330,19 @@ public: return px != 0; } +#elif defined( _MANAGED ) + + static void unspecified_bool( this_type*** ) + { + } + + typedef void (*unspecified_bool_type)( this_type*** ); + + operator unspecified_bool_type() const // never throws + { + return px == 0? 0: unspecified_bool; + } + #elif \ ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \ ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) )