1 // (C) Copyright David Abrahams 2002.
2 // Distributed under the Boost Software License, Version 1.0. (See
3 // accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
6 #ifndef ITERATOR_DWA122600_HPP_
7 #define ITERATOR_DWA122600_HPP_
9 // This header is obsolete and will be deprecated.
12 #if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
22 using std::iterator_traits;
25 #if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
26 // std::distance from stlport with Oracle compiler 12.4 and 12.5 fails to deduce template parameters
27 // when one of the arguments is an array and the other one is a pointer.
28 template< typename T, std::size_t N >
29 inline typename std::iterator_traits< T* >::difference_type distance(T (&left)[N], T* right)
31 return std::distance(static_cast< T* >(left), right);
39 #endif // ITERATOR_DWA122600_HPP_