Chris@16: // Boost.Range library Chris@16: // Chris@16: // Copyright Thorsten Ottosen 2003-2004. Use, modification and Chris@16: // distribution is subject to the Boost Software License, Version Chris@16: // 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: // For more information, see http://www.boost.org/libs/range/ Chris@16: // Chris@16: Chris@16: #ifndef BOOST_RANGE_CONST_ITERATOR_HPP Chris@16: #define BOOST_RANGE_CONST_ITERATOR_HPP Chris@16: Chris@16: #if defined(_MSC_VER) && (_MSC_VER >= 1200) Chris@16: # pragma once Chris@16: #endif Chris@16: Chris@16: #include Chris@16: Chris@16: #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION Chris@16: #include Chris@16: #else Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: namespace boost Chris@16: { Chris@16: ////////////////////////////////////////////////////////////////////////// Chris@16: // default Chris@16: ////////////////////////////////////////////////////////////////////////// Chris@16: Chris@16: namespace range_detail { Chris@16: BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( const_iterator ) Chris@16: } Chris@16: Chris@16: template< typename C > Chris@16: struct range_const_iterator : range_detail::extract_const_iterator Chris@16: {}; Chris@16: Chris@16: ////////////////////////////////////////////////////////////////////////// Chris@16: // pair Chris@16: ////////////////////////////////////////////////////////////////////////// Chris@16: Chris@16: template< typename Iterator > Chris@16: struct range_const_iterator< std::pair > Chris@16: { Chris@16: typedef Iterator type; Chris@16: }; Chris@16: Chris@16: ////////////////////////////////////////////////////////////////////////// Chris@16: // array Chris@16: ////////////////////////////////////////////////////////////////////////// Chris@16: Chris@16: template< typename T, std::size_t sz > Chris@16: struct range_const_iterator< T[sz] > Chris@16: { Chris@16: typedef const T* type; Chris@16: }; Chris@16: Chris@16: } // namespace boost Chris@16: Chris@16: #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION Chris@16: Chris@16: #endif