From 2128428ca1aebcd06d74911b4e67ececc3736069 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Tue, 12 Jul 2016 13:52:05 +0300 Subject: [PATCH] Made the workaround for Oracle compiler more strict. --- include/boost/detail/iterator.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/detail/iterator.hpp b/include/boost/detail/iterator.hpp index ad75e6a..2498ef4 100644 --- a/include/boost/detail/iterator.hpp +++ b/include/boost/detail/iterator.hpp @@ -25,8 +25,8 @@ using std::distance; #if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) // std::distance from stlport with Oracle compiler 12.4 and 12.5 fails to deduce template parameters // when one of the arguments is an array and the other one is a pointer. -template< typename T, std::size_t N, typename U > -inline typename std::iterator_traits< T* >::difference_type distance(T (&left)[N], U* right) +template< typename T, std::size_t N > +inline typename std::iterator_traits< T* >::difference_type distance(T (&left)[N], T* right) { return std::distance(static_cast< T* >(left), right); }