From 55a3c8b9a53298231351b913ef9e3275436d2d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Wed, 26 Nov 2014 07:01:49 +0100 Subject: [PATCH] Simplified iterator_category expression so that old compilers can parse it. --- include/boost/intrusive/detail/iterator.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/intrusive/detail/iterator.hpp b/include/boost/intrusive/detail/iterator.hpp index 6a2bd2b..9dfcb70 100644 --- a/include/boost/intrusive/detail/iterator.hpp +++ b/include/boost/intrusive/detail/iterator.hpp @@ -114,14 +114,16 @@ void distance_impl(InputIt first, InputIt last, Distance& off, const std::random template inline void iterator_advance(InputIt& it, Distance n) { // increment iterator by offset, arbitrary iterators - boost::intrusive::detail::advance_impl(it, n, typename boost::intrusive::iterator_traits::iterator_category()); + typedef typename boost::intrusive::iterator_traits::iterator_category category_t; + boost::intrusive::detail::advance_impl(it, n, category_t()); } template inline typename iterator_traits::difference_type iterator_distance(InputIt first, InputIt last) { typename iterator_traits::difference_type off = 0; - boost::intrusive::detail::distance_impl(first, last, off, typename boost::intrusive::iterator_traits::iterator_category()); + typedef typename boost::intrusive::iterator_traits::iterator_category category_t; + boost::intrusive::detail::distance_impl(first, last, off, category_t()); return off; }