diff --git a/include/boost/range/rbegin.hpp b/include/boost/range/rbegin.hpp index ac518b6..5b13ddb 100755 --- a/include/boost/range/rbegin.hpp +++ b/include/boost/range/rbegin.hpp @@ -16,12 +16,24 @@ #endif #include +#include #include #include namespace boost { +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +template< class C > +inline BOOST_DEDUCED_TYPENAME reverse_result_iterator_of::type +rbegin( C& c ) +{ + return BOOST_DEDUCED_TYPENAME reverse_result_iterator_of::type( end( c ) ); +} + +#else + template< class C > inline BOOST_DEDUCED_TYPENAME reverse_iterator_of::type rbegin( C& c ) @@ -36,6 +48,8 @@ rbegin( const C& c ) return BOOST_DEDUCED_TYPENAME const_reverse_iterator_of::type( end( c ) ); } +#endif + } #endif diff --git a/include/boost/range/rend.hpp b/include/boost/range/rend.hpp index 36138f9..b913a98 100755 --- a/include/boost/range/rend.hpp +++ b/include/boost/range/rend.hpp @@ -16,12 +16,24 @@ #endif #include +#include #include #include namespace boost { + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +template< class C > +inline BOOST_DEDUCED_TYPENAME reverse_result_iterator_of::type +rend( C& c ) +{ + return BOOST_DEDUCED_TYPENAME reverse_result_iterator_of::type( begin( c ) ); +} + +#else + template< class C > inline BOOST_DEDUCED_TYPENAME reverse_iterator_of::type rend( C& c ) @@ -36,6 +48,8 @@ rend( const C& c ) return BOOST_DEDUCED_TYPENAME const_reverse_iterator_of::type( begin( c ) ); } +#endif + } // namespace 'boost' #endif