1[/ 2 Copyright 2010 Neil Groves 3 Distributed under the Boost Software License, Version 1.0. 4 (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5/] 6[section:synopsis Synopsis] 7 8`` 9namespace boost 10{ 11 // 12 // Single Pass Range metafunctions 13 // 14 15 template< class T, class Enabler=void > 16 struct range_iterator; 17 18 template< class T > 19 struct range_value; 20 21 template< class T > 22 struct range_reference; 23 24 template< class T > 25 struct range_pointer; 26 27 template< class T > 28 struct range_category; 29 30 // 31 // Forward Range metafunctions 32 // 33 34 template< class T > 35 struct range_difference; 36 37 // 38 // Bidirectional Range metafunctions 39 // 40 41 template< class T > 42 struct range_reverse_iterator; 43 44 // 45 // Single Pass Range functions 46 // 47 48 template< class T > 49 typename range_iterator<T>::type 50 begin( T& r ); 51 52 template< class T > 53 typename range_iterator<const T>::type 54 begin( const T& r ); 55 56 template< class T > 57 typename range_iterator<T>::type 58 end( T& r ); 59 60 template< class T > 61 typename range_iterator<const T>::type 62 end( const T& r ); 63 64 template< class T > 65 bool 66 empty( const T& r ); 67 68 // 69 // Forward Range functions 70 // 71 72 template< class T > 73 typename range_difference<T>::type 74 distance( const T& r ); 75 76 template< class T > 77 typename range_size<T>::type 78 size( const T& r ); 79 80 // 81 // Bidirectional Range functions 82 // 83 84 template< class T > 85 typename range_reverse_iterator<T>::type 86 rbegin( T& r ); 87 88 template< class T > 89 typename range_reverse_iterator<const T>::type 90 rbegin( const T& r ); 91 92 template< class T > 93 typename range_reverse_iterator<T>::type 94 rend( T& r ); 95 96 template< class T > 97 typename range_reverse_iterator<const T>::type 98 rend( const T& r ); 99 100 // 101 // Special const Range functions 102 // 103 104 template< class T > 105 typename range_iterator<const T>::type 106 const_begin( const T& r ); 107 108 template< class T > 109 typename range_iterator<const T>::type 110 const_end( const T& r ); 111 112 template< class T > 113 typename range_reverse_iterator<const T>::type 114 const_rbegin( const T& r ); 115 116 template< class T > 117 typename range_reverse_iterator<const T>::type 118 const_rend( const T& r ); 119 120 // 121 // String utilities 122 // 123 124 template< class T > 125 iterator_range< ... see below ... > 126 as_literal( T& r ); 127 128 template< class T > 129 iterator_range< ... see below ... > 130 as_literal( const T& r ); 131 132 template< class T > 133 iterator_range< typename range_iterator<T>::type > 134 as_array( T& r ); 135 136 template< class T > 137 iterator_range< typename range_iterator<const T>::type > 138 as_array( const T& r ); 139 140} // namespace 'boost' 141`` 142 143[endsect] 144 145