fixed for msvc + gcc (all regresions ok)

[SVN r35271]
This commit is contained in:
Joel de Guzman
2006-09-22 06:31:17 +00:00
parent 46134407cf
commit da23c8a4cc
3 changed files with 4 additions and 6 deletions

View File

@ -37,8 +37,7 @@ namespace boost { namespace fusion
deref(Iterator const& i) deref(Iterator const& i)
{ {
typedef result_of::deref<Iterator> deref_meta; typedef result_of::deref<Iterator> deref_meta;
typename deref_meta::type result(deref_meta::call(i)); return deref_meta::call(i);
return result;
} }
template <typename Iterator> template <typename Iterator>

View File

@ -56,8 +56,7 @@ namespace boost { namespace fusion { namespace distance_detail
static type static type
call(First const&, Last const&) call(First const&, Last const&)
{ {
static type result; return type();
return result;
} }
}; };

View File

@ -87,7 +87,7 @@ namespace boost { namespace fusion
template <typename Sequence> template <typename Sequence>
explicit cons( explicit cons(
Sequence const& seq Sequence const& seq
#if defined(BOOST_MSVC) //~ #if defined(BOOST_MSVC)
// VC++ gets confused when RHS is a derived type. It fails to call // VC++ gets confused when RHS is a derived type. It fails to call
// the copy ctor and attempts to call this templated constructor instead. // the copy ctor and attempts to call this templated constructor instead.
, typename disable_if< , typename disable_if<
@ -96,7 +96,7 @@ namespace boost { namespace fusion
, is_convertible<Sequence, Car> // use copy to car instead , is_convertible<Sequence, Car> // use copy to car instead
> >
>::type* dummy = 0 >::type* dummy = 0
#endif //~ #endif
) )
: car(*fusion::begin(seq)) : car(*fusion::begin(seq))
, cdr(fusion::next(fusion::begin(seq)), mpl::true_()) {} , cdr(fusion::next(fusion::begin(seq)), mpl::true_()) {}