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)
5
6#ifndef ITERATOR_DWA122600_HPP_
7#define ITERATOR_DWA122600_HPP_
8
9// This header is obsolete and deprecated.
10
11#include <boost/config/header_deprecated.hpp>
12
13BOOST_HEADER_DEPRECATED("<iterator>")
14
15#include <iterator>
16#if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
17#include <cstddef>
18#endif
19
20namespace boost
21{
22
23namespace detail
24{
25
26using std::iterator_traits;
27using std::distance;
28
29#if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
30// std::distance from stlport with Oracle compiler 12.4 and 12.5 fails to deduce template parameters
31// when one of the arguments is an array and the other one is a pointer.
32template< typename T, std::size_t N >
33inline typename std::iterator_traits< T* >::difference_type distance(T (&left)[N], T* right)
34{
35 return std::distance(static_cast< T* >(left), right);
36}
37#endif
38
39} // namespace detail
40
41} // namespace boost
42
43#endif // ITERATOR_DWA122600_HPP_
44

source code of boost/libs/core/include/boost/detail/iterator.hpp