MSVC fixes

[SVN r26558]
This commit is contained in:
Aleksey Gurtovoy
2004-12-20 17:52:43 +00:00
parent 00f785c600
commit b2d6399e81
2 changed files with 24 additions and 3 deletions

View File

@@ -64,9 +64,13 @@ template<> struct advance_impl<aux::r_iter_tag>
{
template< typename Iter, typename Dist > struct apply
{
typedef typename Iter::type n_;
typedef typename deref<Iter>::type n_;
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
typedef typename plus_impl<integral_c_tag,integral_c_tag>
::template apply<n_,Dist>::type m_;
#else
typedef typename plus<n_,Dist>::type m_;
#endif
// agurt, 10/nov/04: to be generic, the code have to do something along
// the lines below...
//
@@ -78,7 +82,7 @@ template<> struct advance_impl<aux::r_iter_tag>
// ... meanwhile:
typedef integral_c<
typename n_::value_type
typename aux::value_type_wknd<n_>::type
, BOOST_MPL_AUX_VALUE_WKND(m_)::value
> result_;

View File

@@ -69,4 +69,21 @@ template<> struct value_wknd<int>
/**/
#endif
namespace boost { namespace mpl { namespace aux {
template< typename T > struct value_type_wknd
{
typedef typename T::value_type type;
};
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
template<> struct value_type_wknd<int>
{
typedef int type;
};
#endif
}}}
#endif // BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED