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

@ -159,12 +159,15 @@ namespace detail
typename traversal_archetype_impl<TraversalCategory>::template archetype<Derived,Value> typename traversal_archetype_impl<TraversalCategory>::template archetype<Derived,Value>
>::type >::type
{ {
traversal_archetype_() {} typedef typename
traversal_archetype_(ctor_arg arg) traversal_archetype_impl<TraversalCategory>::template archetype<Derived,Value>
: mpl::aux::msvc_eti_base< base;
typename traversal_archetype_impl<TraversalCategory>::template archetype<Derived,Value>
>::type(arg) traversal_archetype_() {}
{}
traversal_archetype_(ctor_arg arg)
: base(arg)
{}
}; };
template <> template <>
@ -471,12 +474,25 @@ struct iterator_archetype
iterator_archetype() { } iterator_archetype() { }
iterator_archetype(iterator_archetype const& x) iterator_archetype(iterator_archetype const& x)
: detail::iterator_archetype_base<Value, AccessCategory, TraversalCategory>(x) { } : detail::iterator_archetype_base<
Value
, AccessCategory
, TraversalCategory
>(x)
{}
iterator_archetype& operator=(iterator_archetype const&) { return *this; } iterator_archetype& operator=(iterator_archetype const&)
{ return *this; }
# if 0
// Optional conversion from mutable // Optional conversion from mutable
// iterator_archetype(iterator_archetype<typename detail::convertible_type<Value>::type, AccessCategory, TraversalCategory> const&); iterator_archetype(
iterator_archetype<
typename detail::convertible_type<Value>::type
, AccessCategory
, TraversalCategory> const&
);
# endif
}; };
} // namespace boost } // namespace boost

View File

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