From 2bacc663b1efd311d60851137d724a9f252f7cbb Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sun, 18 Jan 2004 16:17:39 +0000 Subject: [PATCH] vc6 workaround and a bugfix [SVN r21799] --- .../boost/iterator/iterator_archetypes.hpp | 34 ++++++++++++++----- include/boost/iterator/iterator_facade.hpp | 22 ++++++++---- 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/include/boost/iterator/iterator_archetypes.hpp b/include/boost/iterator/iterator_archetypes.hpp index 71306c8..e216647 100644 --- a/include/boost/iterator/iterator_archetypes.hpp +++ b/include/boost/iterator/iterator_archetypes.hpp @@ -159,12 +159,15 @@ namespace detail typename traversal_archetype_impl::template archetype >::type { - traversal_archetype_() {} - traversal_archetype_(ctor_arg arg) - : mpl::aux::msvc_eti_base< - typename traversal_archetype_impl::template archetype - >::type(arg) - {} + typedef typename + traversal_archetype_impl::template archetype + base; + + traversal_archetype_() {} + + traversal_archetype_(ctor_arg arg) + : base(arg) + {} }; template <> @@ -471,12 +474,25 @@ struct iterator_archetype iterator_archetype() { } iterator_archetype(iterator_archetype const& x) - : detail::iterator_archetype_base(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 - // iterator_archetype(iterator_archetype::type, AccessCategory, TraversalCategory> const&); + iterator_archetype( + iterator_archetype< + typename detail::convertible_type::type + , AccessCategory + , TraversalCategory> const& + ); +# endif }; } // namespace boost diff --git a/include/boost/iterator/iterator_facade.hpp b/include/boost/iterator/iterator_facade.hpp index 879beb3..1e2ec70 100644 --- a/include/boost/iterator/iterator_facade.hpp +++ b/include/boost/iterator/iterator_facade.hpp @@ -31,6 +31,10 @@ #include #include +#if BOOST_WORKAROUND(BOOST_MSVC, == 1200) +# include +#endif + #include // this goes last namespace boost @@ -223,16 +227,20 @@ namespace boost { template struct apply - : mpl::apply_if< - is_convertible + : # if BOOST_WORKAROUND(BOOST_MSVC, == 1200) - , typename I1::difference_type - , typename I2::difference_type + mpl::if_< + is_convertible + , typename I1::difference_type + , typename I2::difference_type + > # else - , iterator_difference - , iterator_difference + mpl::apply_if< + is_convertible + , iterator_difference + , iterator_difference + > # endif - > {}; };