From c5e909e6e19e514edff897e9977ad5e4e4c3c527 Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Tue, 17 Sep 2002 08:35:18 +0000 Subject: [PATCH] MSVC 7.0 fix [SVN r15401] --- include/boost/mpl/if.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/boost/mpl/if.hpp b/include/boost/mpl/if.hpp index bf36e09..7283e5b 100644 --- a/include/boost/mpl/if.hpp +++ b/include/boost/mpl/if.hpp @@ -61,7 +61,7 @@ struct if_ BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(C,T1,T2)) }; -#elif defined(BOOST_MSVC) && (BOOST_MSVC <= 1200) +#elif defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) // MSVC6.5-specific version @@ -92,9 +92,13 @@ struct if_ private: template struct answer { typedef T1 type; }; template<> struct answer { typedef T2 type; }; - + + // agurt, 17/sep/02: in some situations MSVC 7.0 doesn't + // handle 'answer' expression very well + enum { c_ = C::value }; + public: - typedef typename answer< C::value >::type type; + typedef typename answer::type type; }; #else