From da23c8a4cc50a9729f4a9586f08761fd54fa91e0 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Fri, 22 Sep 2006 06:31:17 +0000 Subject: [PATCH] fixed for msvc + gcc (all regresions ok) [SVN r35271] --- include/boost/fusion/iterator/deref.hpp | 3 +-- include/boost/fusion/iterator/detail/distance.hpp | 3 +-- include/boost/fusion/sequence/container/list/cons.hpp | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/boost/fusion/iterator/deref.hpp b/include/boost/fusion/iterator/deref.hpp index 9819e034..8236fe5c 100644 --- a/include/boost/fusion/iterator/deref.hpp +++ b/include/boost/fusion/iterator/deref.hpp @@ -37,8 +37,7 @@ namespace boost { namespace fusion deref(Iterator const& i) { typedef result_of::deref deref_meta; - typename deref_meta::type result(deref_meta::call(i)); - return result; + return deref_meta::call(i); } template diff --git a/include/boost/fusion/iterator/detail/distance.hpp b/include/boost/fusion/iterator/detail/distance.hpp index d41d4c2e..2ee467d6 100644 --- a/include/boost/fusion/iterator/detail/distance.hpp +++ b/include/boost/fusion/iterator/detail/distance.hpp @@ -56,8 +56,7 @@ namespace boost { namespace fusion { namespace distance_detail static type call(First const&, Last const&) { - static type result; - return result; + return type(); } }; diff --git a/include/boost/fusion/sequence/container/list/cons.hpp b/include/boost/fusion/sequence/container/list/cons.hpp index 8be6b239..c3de861d 100644 --- a/include/boost/fusion/sequence/container/list/cons.hpp +++ b/include/boost/fusion/sequence/container/list/cons.hpp @@ -87,7 +87,7 @@ namespace boost { namespace fusion template explicit cons( Sequence const& seq -#if defined(BOOST_MSVC) +//~ #if defined(BOOST_MSVC) // VC++ gets confused when RHS is a derived type. It fails to call // the copy ctor and attempts to call this templated constructor instead. , typename disable_if< @@ -96,7 +96,7 @@ namespace boost { namespace fusion , is_convertible // use copy to car instead > >::type* dummy = 0 -#endif +//~ #endif ) : car(*fusion::begin(seq)) , cdr(fusion::next(fusion::begin(seq)), mpl::true_()) {}