Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:35:27

0001 // (C) Copyright David Abrahams 2002.
0002 // Distributed under the Boost Software License, Version 1.0. (See
0003 // accompanying file LICENSE_1_0.txt or copy at
0004 // http://www.boost.org/LICENSE_1_0.txt)
0005 
0006 #ifndef ITERATOR_DWA122600_HPP_
0007 #define ITERATOR_DWA122600_HPP_
0008 
0009 // This header is obsolete and deprecated.
0010 
0011 #include <boost/config/header_deprecated.hpp>
0012 
0013 BOOST_HEADER_DEPRECATED("<iterator>")
0014 
0015 #include <iterator>
0016 #if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
0017 #include <cstddef>
0018 #endif
0019 
0020 namespace boost
0021 {
0022 
0023 namespace detail
0024 {
0025 
0026 using std::iterator_traits;
0027 using std::distance;
0028 
0029 #if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
0030 // std::distance from stlport with Oracle compiler 12.4 and 12.5 fails to deduce template parameters
0031 // when one of the arguments is an array and the other one is a pointer.
0032 template< typename T, std::size_t N >
0033 inline typename std::iterator_traits< T* >::difference_type distance(T (&left)[N], T* right)
0034 {
0035     return std::distance(static_cast< T* >(left), right);
0036 }
0037 #endif
0038 
0039 } // namespace detail
0040 
0041 } // namespace boost
0042 
0043 #endif // ITERATOR_DWA122600_HPP_