diff --git a/doc/boost_range.html b/doc/boost_range.html index d8d956d..65284fa 100644 --- a/doc/boost_range.html +++ b/doc/boost_range.html @@ -70,6 +70,10 @@ class=identifier>range_iterator; struct range_value; + template< class T > + struct range_reference; + template< class T > struct range_pointer; @@ -101,23 +105,23 @@ class=identifier>range_reverse_iterator; template< class T > typename range_iterator<T>::type - begin( T& c ); + begin( T& r ); template< class T > typename range_iterator<const T>::type - begin( const T& c ); + begin( const T& r ); template< class T > typename range_iterator<T>::type - end( T& c ); + end( T& r ); template< class T > typename range_iterator<const T>::type - end( const T& c ); + end( const T& r ); template< class T > bool - empty( const T& c ); + empty( const T& r ); // // Forward Range functions @@ -125,7 +129,7 @@ class=identifier>range_reverse_iterator; template< class T > typename range_difference<T>::type - distance( const T& c ); + distance( const T& r ); // // Bidirectional Range functions @@ -133,20 +137,20 @@ class=identifier>range_reverse_iterator; template< class T > typename range_reverse_iterator<T>::type - rbegin( T& c ); + rbegin( T& r ); template< class T > typename range_reverse_iterator<const T>::type - rbegin( const T& c ); + rbegin( const T& r ); template< class T > typename range_reverse_iterator<T>::type - rend( T& c ); + rend( T& r ); template< class T > typename range_reverse_iterator<const T>::type rend( const T& c ); +class=identifier>T& r ); // // Random Access Range functions @@ -154,7 +158,7 @@ class=identifier>T& template< class T > typename range_size<T>::type - size( const T& c ); + size( const T& r ); // // Special const Range functions @@ -176,6 +180,26 @@ class=identifier>T& typename range_reverse_iterator<const T>::type const_rend( const T& r ); + // + // String utilities + // + + template< class T > + iterator_range<...see below...> + as_literal( T& r ); + + template< class T > + iterator_range<...see below...> + as_literal( const T& r ); + + template< class T > + iterator_range< typename range_iterator<T>::type > + as_array( T& r ); + + template< class T > + iterator_range< typename range_iterator<const T>::type > + as_array( const T& r ); + } // namespace 'boost' @@ -235,20 +259,13 @@ class=identifier>T& Complexity - - - range_value<X>::type - boost::iterator_value<range_iterator<X>::type>::type - - compile time - range_iterator<X>::type T::iterator
P::first_type
A*
- Char* + compile time @@ -257,7 +274,37 @@ class=identifier>T
& T::const_iterator
P::first_type
const A*
- const Char* + + compile time + + + + range_value<X>::type + boost::iterator_value<range_iterator<X>::type>::type + + compile time + + + + range_reference<X>::type + boost::iterator_reference<range_iterator<X>::type>::type + + compile time + + + + + range_pointer<X>::type + boost::iterator_pointer<range_iterator<X>::type>::type + + compile time + + + + + range_category<X>::type + boost::iterator_category<range_iterator<X>::type>::type + compile time @@ -269,15 +316,7 @@ class=identifier>T
& compile time - - - range_result_iterator<X>::type - range_const_iterator<X>::type if X is const -
- range_iterator<X>::type otherwise - - compile time - + range_reverse_iterator<X>::type @@ -309,11 +348,10 @@ class=identifier>T
& begin(x) - range_result_iterator<X>::type + range_iterator<X>::type p.first if p is of type std::pair<T>
a if a is an array
- s if s is a string literal
range_begin(x) if that expression would invoke a function found by ADL
t.begin() otherwise @@ -322,29 +360,24 @@ class=identifier>T
& end(x) - range_result_iterator<X>::type + range_iterator<X>::type p.second if p is of type std::pair<T>
- a + sz if a is an array of size sz
- s + std::char_traits<X>::length( s ) if s is a Char* -
- s + sz - 1 if s is a string literal of size sz + a + sz if a is an array of size sz +
range_end(x) if that expression would invoke a function found by ADL
t.end() otherwise - linear if X is Char* -
- constant time otherwise + + constant time empty(x) bool - begin(x) == end( x )
- linear if X is Char* -
- constant time otherwise
+ boost::begin(x) == boost::end(x)
+ constant time
@@ -372,49 +405,71 @@ class=identifier>T
& rbegin(x) range_reverse_iterator<X>::type - range_reverse_iterator<X>::type( end(x) ) + range_reverse_iterator<X>::type( boost::end(x) )
- same as end(x) + constant time rend(x) range_reverse_iterator<X>::type - range_reverse_iterator<X>::type( begin(x) ) - same as begin(x) + range_reverse_iterator<X>::type( boost::begin(x) ) + constant time const_begin(x) range_iterator<const X>::type - range_iterator<const X>::type( begin(x) ) + range_iterator<const X>::type( boost::begin(x) )
- same as begin(x) + constant time const_end(x) range_iterator<const X>::type - range_iterator<const X>::type( end(x) ) - same as end(x) + range_iterator<const X>::type( boost::end(x) ) + constant time const_rbegin(x) range_reverse_iterator<const X>::type - range_reverse_iterator<const X>::type( rbegin(x) ) + range_reverse_iterator<const X>::type( boost::rbegin(x) )
- same as rbegin(x) + constant time const_rend(x) range_reverse_iterator<const X>::type - range_reverse_iterator<const X>::type( rend(x) ) - same as rend(x) + range_reverse_iterator<const X>::type( boost::rend(x) ) + + constant time + + + + as_literal(x) + iterator_range<U> where U is + Char* if x is a pointer to a + string and U is + range_iterator<X>::type otherwise + + + + [a,a+sz-1) if a is an array of size sz
+ [s,s + std::char_traits<X>::length(s)) if s is a Char* +
+ [boost::begin(x),boost::end(x)) otherwise + + + + + linear time for pointers to a string, constant time + otherwise

@@ -422,6 +477,10 @@ class=identifier>T
& const_
-named functions are useful when you want to document clearly that your code is read-only.

+

Notice that the above functions should always be called with + qualification (boost::) to prevent unintended + Argument Dependent Lookup (ADL). +


Extending the library