vc6 workaround and a bugfix

[SVN r21799]
This commit is contained in:
Dave Abrahams
2004-01-18 16:17:39 +00:00
parent c5dc0fbf0e
commit 2bacc663b1
2 changed files with 40 additions and 16 deletions

View File

@ -31,6 +31,10 @@
#include <boost/mpl/always.hpp>
#include <boost/mpl/apply.hpp>
#if BOOST_WORKAROUND(BOOST_MSVC, == 1200)
# include <boost/mpl/if.hpp>
#endif
#include <boost/iterator/detail/config_def.hpp> // this goes last
namespace boost
@ -223,16 +227,20 @@ namespace boost
{
template <class I1, class I2>
struct apply
: mpl::apply_if<
is_convertible<I2,I1>
:
# if BOOST_WORKAROUND(BOOST_MSVC, == 1200)
, typename I1::difference_type
, typename I2::difference_type
mpl::if_<
is_convertible<I2,I1>
, typename I1::difference_type
, typename I2::difference_type
>
# else
, iterator_difference<I1>
, iterator_difference<I2>
mpl::apply_if<
is_convertible<I2,I1>
, iterator_difference<I1>
, iterator_difference<I2>
>
# endif
>
{};
};