annotate DEPENDENCIES/generic/include/boost/range/const_iterator.hpp @ 16:2665513ce2d3

Add boost headers
author Chris Cannam
date Tue, 05 Aug 2014 11:11:38 +0100
parents
children c530137014c0
rev   line source
Chris@16 1 // Boost.Range library
Chris@16 2 //
Chris@16 3 // Copyright Thorsten Ottosen 2003-2004. Use, modification and
Chris@16 4 // distribution is subject to the Boost Software License, Version
Chris@16 5 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
Chris@16 6 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 7 //
Chris@16 8 // For more information, see http://www.boost.org/libs/range/
Chris@16 9 //
Chris@16 10
Chris@16 11 #ifndef BOOST_RANGE_CONST_ITERATOR_HPP
Chris@16 12 #define BOOST_RANGE_CONST_ITERATOR_HPP
Chris@16 13
Chris@16 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
Chris@16 15 # pragma once
Chris@16 16 #endif
Chris@16 17
Chris@16 18 #include <boost/range/config.hpp>
Chris@16 19
Chris@16 20 #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Chris@16 21 #include <boost/range/detail/const_iterator.hpp>
Chris@16 22 #else
Chris@16 23
Chris@16 24 #include <boost/range/detail/extract_optional_type.hpp>
Chris@16 25 #include <boost/type_traits/remove_const.hpp>
Chris@16 26 #include <cstddef>
Chris@16 27 #include <utility>
Chris@16 28
Chris@16 29 namespace boost
Chris@16 30 {
Chris@16 31 //////////////////////////////////////////////////////////////////////////
Chris@16 32 // default
Chris@16 33 //////////////////////////////////////////////////////////////////////////
Chris@16 34
Chris@16 35 namespace range_detail {
Chris@16 36 BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( const_iterator )
Chris@16 37 }
Chris@16 38
Chris@16 39 template< typename C >
Chris@16 40 struct range_const_iterator : range_detail::extract_const_iterator<C>
Chris@16 41 {};
Chris@16 42
Chris@16 43 //////////////////////////////////////////////////////////////////////////
Chris@16 44 // pair
Chris@16 45 //////////////////////////////////////////////////////////////////////////
Chris@16 46
Chris@16 47 template< typename Iterator >
Chris@16 48 struct range_const_iterator< std::pair<Iterator,Iterator> >
Chris@16 49 {
Chris@16 50 typedef Iterator type;
Chris@16 51 };
Chris@16 52
Chris@16 53 //////////////////////////////////////////////////////////////////////////
Chris@16 54 // array
Chris@16 55 //////////////////////////////////////////////////////////////////////////
Chris@16 56
Chris@16 57 template< typename T, std::size_t sz >
Chris@16 58 struct range_const_iterator< T[sz] >
Chris@16 59 {
Chris@16 60 typedef const T* type;
Chris@16 61 };
Chris@16 62
Chris@16 63 } // namespace boost
Chris@16 64
Chris@16 65 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Chris@16 66
Chris@16 67 #endif