diff --git a/include/boost/iterator/detail/config_def.hpp b/include/boost/iterator/detail/config_def.hpp index e68e78d..6789d4a 100644 --- a/include/boost/iterator/detail/config_def.hpp +++ b/include/boost/iterator/detail/config_def.hpp @@ -95,4 +95,10 @@ # define BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY #endif +# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +# define BOOST_ARG_DEPENDENT_TYPENAME typename +# else +# define BOOST_ARG_DEPENDENT_TYPENAME +# endif + // no include guard multiple inclusion intended diff --git a/include/boost/iterator/detail/config_undef.hpp b/include/boost/iterator/detail/config_undef.hpp index 24c4717..f58df62 100644 --- a/include/boost/iterator/detail/config_undef.hpp +++ b/include/boost/iterator/detail/config_undef.hpp @@ -17,6 +17,7 @@ #undef BOOST_NO_IS_CONVERTIBLE #undef BOOST_NO_IS_CONVERTIBLE_TEMPLATE #undef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY +#undef BOOST_ARG_DEPENDENT_TYPENAME #ifdef BOOST_ITERATOR_CONFIG_DEF # undef BOOST_ITERATOR_CONFIG_DEF diff --git a/include/boost/iterator/iterator_adaptor.hpp b/include/boost/iterator/iterator_adaptor.hpp index 0f8a9bf..c29dbd9 100644 --- a/include/boost/iterator/iterator_adaptor.hpp +++ b/include/boost/iterator/iterator_adaptor.hpp @@ -276,7 +276,7 @@ namespace boost BOOST_STATIC_ASSERT( (detail::is_tag< random_access_traversal_tag - , typename super_t::iterator_category::traversal + , BOOST_ARG_DEPENDENT_TYPENAME super_t::iterator_category::traversal >::value) ); m_iterator += n; @@ -289,7 +289,7 @@ namespace boost BOOST_STATIC_ASSERT( (detail::is_tag< bidirectional_traversal_tag - , typename super_t::iterator_category::traversal + , BOOST_ARG_DEPENDENT_TYPENAME super_t::iterator_category::traversal >::value) ); --m_iterator; @@ -304,7 +304,7 @@ namespace boost BOOST_STATIC_ASSERT( (detail::is_tag< random_access_traversal_tag - , typename super_t::iterator_category::traversal + , BOOST_ARG_DEPENDENT_TYPENAME super_t::iterator_category::traversal >::value) ); // Maybe readd with same_distance diff --git a/include/boost/iterator/transform_iterator.hpp b/include/boost/iterator/transform_iterator.hpp index 3400134..26ed994 100644 --- a/include/boost/iterator/transform_iterator.hpp +++ b/include/boost/iterator/transform_iterator.hpp @@ -32,14 +32,14 @@ namespace boost { template - struct result + struct function_object_result { typedef typename UnaryFunction::result_type type; }; #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template - struct result + struct function_object_result { typedef Return type; }; @@ -59,7 +59,7 @@ namespace boost typedef typename mpl::apply_if< is_same< Reference, use_default > - , result + , function_object_result , mpl::identity >::type result_type; @@ -140,7 +140,7 @@ namespace boost return transform_iterator(it, fun); } -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) template transform_iterator< Return (*)(Argument), Iterator, Return> make_transform_iterator(Iterator it, Return (*fun)(Argument))