2004-07-26 00:32:12 +00:00
|
|
|
// (C) Copyright David Abrahams 2002.
|
|
|
|
// Distributed under the Boost Software License, Version 1.0. (See
|
|
|
|
// accompanying file LICENSE_1_0.txt or copy at
|
|
|
|
// http://www.boost.org/LICENSE_1_0.txt)
|
2001-01-21 05:18:41 +00:00
|
|
|
|
|
|
|
#ifndef ITERATOR_DWA122600_HPP_
|
2014-06-08 19:02:03 +03:00
|
|
|
#define ITERATOR_DWA122600_HPP_
|
2003-08-28 16:52:02 +00:00
|
|
|
|
2019-11-23 16:51:56 +03:00
|
|
|
// This header is obsolete and deprecated.
|
|
|
|
|
|
|
|
#include <boost/config/header_deprecated.hpp>
|
|
|
|
|
|
|
|
BOOST_HEADER_DEPRECATED("<iterator>")
|
2003-08-28 16:52:02 +00:00
|
|
|
|
2014-06-08 19:02:03 +03:00
|
|
|
#include <iterator>
|
2016-07-11 16:34:02 +03:00
|
|
|
#if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
|
|
|
#include <cstddef>
|
|
|
|
#endif
|
2002-11-08 06:57:31 +00:00
|
|
|
|
2014-06-08 19:02:03 +03:00
|
|
|
namespace boost
|
2001-01-21 05:18:41 +00:00
|
|
|
{
|
|
|
|
|
2014-06-08 19:02:03 +03:00
|
|
|
namespace detail
|
2001-01-21 05:18:41 +00:00
|
|
|
{
|
2002-11-08 06:57:31 +00:00
|
|
|
|
2014-06-08 19:02:03 +03:00
|
|
|
using std::iterator_traits;
|
|
|
|
using std::distance;
|
2003-08-28 16:52:02 +00:00
|
|
|
|
2016-07-11 16:34:02 +03:00
|
|
|
#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.
|
2016-07-12 13:52:05 +03:00
|
|
|
template< typename T, std::size_t N >
|
|
|
|
inline typename std::iterator_traits< T* >::difference_type distance(T (&left)[N], T* right)
|
2016-07-11 16:34:02 +03:00
|
|
|
{
|
|
|
|
return std::distance(static_cast< T* >(left), right);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2014-06-08 19:02:03 +03:00
|
|
|
} // namespace detail
|
2001-01-21 05:18:41 +00:00
|
|
|
|
2014-06-08 19:02:03 +03:00
|
|
|
} // namespace boost
|
2001-01-21 05:18:41 +00:00
|
|
|
|
|
|
|
#endif // ITERATOR_DWA122600_HPP_
|