diff --git a/doc/boost_range.html b/doc/boost_range.html
index e652436..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;
@@ -94,14 +98,6 @@ class=identifier>range_difference;
struct range_reverse_iterator;
-
- //
- // Random Access Range metafunctions
- //
-
- template< class T >
- struct range_size;
//
// Single Pass Range functions
@@ -109,23 +105,23 @@ class=identifier>range_size;
template< class T >
typename range_iterator<T>::type
- begin( T& c );
+ begin( T& r );
template< class T >
- typename range_iterator<T>::type
- begin( const T& c );
+ typename range_iterator<const T>::type
+ begin( const T& r );
template< class T >
typename range_iterator<T>::type
- end( T& c );
+ end( T& r );
template< class T >
- typename range_iterator<T>::type
- end( const T& c );
+ typename range_iterator<const T>::type
+ end( const T& r );
template< class T >
bool
- empty( const T& c );
+ empty( const T& r );
//
// Forward Range functions
@@ -133,7 +129,7 @@ class=identifier>range_size;
template< class T >
typename range_difference<T>::type
- distance( const T& c );
+ distance( const T& r );
//
// Bidirectional Range functions
@@ -141,30 +137,29 @@ class=identifier>range_size;
template< class T >
typename range_reverse_iterator<T>::type
- rbegin( T& c );
+ rbegin( T& r );
template< class T >
- typename range_reverse_iterator<T>::type
- rbegin( const T& c );
+ typename range_reverse_iterator<const T>::type
+ 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<T>::type
+ typename range_reverse_iterator<const T>::type
rend( const T& c );
+class=identifier>T& r );
-
//
// Random Access Range functions
//
template< class T >
typename range_size<T>::type
- size( const T& c );
-
+ size( const T& r );
+
//
// Special const Range functions
//
@@ -185,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'
@@ -244,88 +259,79 @@ class=identifier>T&
Complexity
-
-
-
- range_value<X>::type
T::value_type
- boost::iterator_value<P::first_type>::type
- A
- Char
- compile time
-
range_iterator<X>::type
T::iterator
P::first_type
A*
- Char*
+
compile time
-
+
+ range_const_iterator<X>::type
range_iterator<const X>::type
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
-
- range_difference<X>::type
T::difference_type
- boost::iterator_difference<P::first_type>::type
- std::ptrdiff_t
- std::ptrdiff_t
+
+
+
boost::iterator_difference<range_iterator<X>::type>::type
compile time
-
-
-
- range_size<X>::type
T::size_type
- std::size_t
- std::size_t
- std::size_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
boost::reverse_iterator< typename range_iterator<T>::type >
+ boost::reverse_iterator<range_iterator<X>::type>
compile time
-
-
- range_const_reverse_iterator<X>::type
boost::reverse_iterator< typename range_const_iterator<T>::type >
+
+ range_reverse_iterator<const X>::type
boost::reverse_iterator<range_iterator<const X>::type>
compile time
-
-
- range_reverse_result_iterator<X>::type
boost::reverse_iterator< typename range_result_iterator<T>::type
- >
- compile time
-
- The special metafunctions range_result_iterator
and range_reverse_result_iterator
- are not part of any Range concept, but they are very useful when implementing
- certain Range classes like sub_range
- because of their ability to select iterators based on constness.
-
- The special const
functions are not part of any Range concept, but
- are very useful when you want to document clearly that your code is read-only.
+ The special 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).
+
size()
@@ -520,10 +548,6 @@ class=identifier>T& const_iterator
size_type
@@ -554,26 +578,23 @@ class=identifier>T&
Related concept
-
+ boost_range_begin(x)
range_begin(x)
Single Pass Range
-
- boost_range_end(x)
+ range_end(x)
Single Pass Range
-
+
- boost_range_size(x)
Forward Range
-
boost_range_begin()
and boost_range_end()
must be
+
range_begin()
and range_end()
must be
overloaded for both const
and mutable reference arguments.
- You must also specialize 3 metafunctions for your type X
:
+ You must also specialize two metafunctions for your type X
:
boost::range_iterator |
+ boost::range_mutable_iterator |
Single Pass Range |
boost::range_const_iterator |
Single Pass Range | |
boost::range_size |
- Forward Range | -
@@ -627,7 +645,7 @@ class=identifier>T&
template< class T >
- struct range_iterator< Foo::Pair<T> >
+ struct range_mutable_iterator< Foo::Pair<T> >
{
typedef T type;
};
@@ -636,20 +654,13 @@ class=identifier>T& struct range_const_iterator< Foo::Pair<T> >
{
//
- // Remark: this is defined similar to 'range_iterator'
+ // Remark: this is defined similar to 'range_mutable_iterator'
// because the 'Pair' type does not distinguish
// between an iterator and a const_iterator.
//
typedef T type;
};
- template< class T >
- struct range_size< Foo::Pair<T> >
- {
-
- typedef std::size_t type;
- };
-
} // namespace 'boost'
namespace Foo
@@ -661,36 +672,29 @@ class=identifier>T&
template< class T >
- inline T boost_range_begin( Pair<T>& x )
+ inline T range_begin( Pair<T>& x )
{
return x.first;
}
template< class T >
- inline T boost_range_begin( const Pair<T>& x )
+ inline T range_begin( const Pair<T>& x )
{
return x.first;
}
template< class T >
- inline T boost_range_end( Pair<T>& x )
+ inline T range_end( Pair<T>& x )
{
return x.last;
}
template< class T >
- inline T boost_range_end( const Pair<T>& x )
+ inline T range_end( const Pair<T>& x )
{
return x.last;
}
- template< class T >
- inline typename boost::range_size< Pair<T> >::type
- boost_range_size( const Pair<T>& x )
- {
- return std::distance(x.first,x.last);
- }
-
} // namespace 'Foo'
#include <vector>
@@ -699,7 +703,7 @@ class=identifier>T& {
typedef std::vector<int>::iterator iter;
std::vector<int> vec;
- Foo::Pair<iter> pair = { vec.begin(), vec.end() };
+ Foo::Pair<iter> pair = { vec.begin(), vec.end() };
const Foo::Pair<iter>& cpair = pair;
//
// Notice that we call 'begin' etc with qualification.
@@ -708,9 +712,9 @@ class=identifier>T& iter e = boost::end( pair );
i = boost::begin( cpair );
e = boost::end( cpair );
- boost::range_size< Foo::Pair<iter> >::type s = boost::size( pair );
+ boost::range_difference< Foo::Pair<iter> >::type s = boost::size( pair );
s = boost::size( cpair );
- boost::range_const_reverse_iterator< Foo::Pair<iter> >::type
+ boost::range_reverse_iterator< const Foo::Pair<iter> >::type
ri = boost::rbegin( cpair ),
re = boost::rend( cpair );
}
@@ -719,7 +723,7 @@ class=identifier>T&
- (C) Copyright Thorsten Ottosen 2003-2004
+ (C) Copyright Thorsten Ottosen 2003-2007
- Warning: support for null-terminated strings is deprecated and will
- disappear in the next Boost release (1.34).
-
diff --git a/doc/examples.html b/doc/examples.html
index 6db7253..0ea235d 100755
--- a/doc/examples.html
+++ b/doc/examples.html
@@ -26,10 +26,6 @@
shows how to implement a container version of std::find()
that
works with char[],wchar_t[],char*,wchar_t*.
- algorithm_example.cpp
diff --git a/doc/intro.html b/doc/intro.html
index b0542b2..8478d3e 100755
--- a/doc/intro.html
+++ b/doc/intro.html
@@ -35,16 +35,14 @@
enough functionality to satisfy the needs of the generic code
if a suitable layer of indirection is applied . For
example, raw arrays are often suitable for use with generic code that
- works with containers, provided a suitable adapter is used. Likewise, null
- terminated strings can be treated as containers of characters, if suitably
- adapted.
+ works with containers, provided a suitable adapter is used.
This library therefore provides the means to adapt standard-like
- containers,
- null terminated strings, std::pairs
of iterators, and raw
- arrays (and more), such that the same generic code can work with them all.
+ containers, std::pairs
of iterators, and raw arrays (and
+ more), such that
+ the same generic code can work with them all.
The basic idea is to add another layer of indirection using metafunctions and
free-standing functions so syntactic and/or semantic differences can be removed.
diff --git a/doc/mfc_atl.html b/doc/mfc_atl.html
index 5717cc8..a022fe3 100644
--- a/doc/mfc_atl.html
+++ b/doc/mfc_atl.html
@@ -3,14 +3,289 @@
Boost.Range MFC/ATL Extension provides Boost.Range support for MFC/ATL collection and string types.
+Boost.Range MFC/ATL Extension provides Boost.Range support for MFC/ATL collection and string types.
CTypedPtrArray<CPtrArray, CList<CString> *> myArray; ... @@ -64,7 +339,7 @@ BOOST_FOREACH (CList<CString> *theList, myArray)
If the <boost/range/mfc.hpp> is included before or after Boost.Range headers, +
If the <boost/range/mfc.hpp> is included before or after Boost.Range headers, the MFC collections and strings become models of Range. The table below lists the Traversal Category and range_reference of MFC ranges.
Other Boost.Range metafunctions are defined by the following. +
Other Boost.Range metafunctions are defined by the following.
Let Range be any type listed above and ReF be the same as range_reference<Range>::type.
range_value<Range>::type is the same as remove_reference<remove_const<Ref>::type>::type,
range_difference<Range>::type is the same as std::ptrdiff_t, and
@@ -179,7 +454,7 @@ As for const
If the <boost/range/atl.hpp> is included before or after Boost.Range headers,
+ If the <boost/range/atl.hpp> is included before or after Boost.Range headers,
the ATL collections and strings become models of Range.
The table below lists the Traversal Category and range_reference of ATL ranges. Other Boost.Range metafunctions are defined by the following.
+ Other Boost.Range metafunctions are defined by the following.
Let Range be any type listed above and ReF be the same as range_reference<Range>::type.
range_value<Range>::type is the same as remove_reference<Ref>::type,
range_difference<Range>::type is the same as std::ptrdiff_t, and
@@ -288,7 +563,7 @@ else if (there is a type X such that X* const is the same as ReF)
else
return ReF
- Other Boost.Range metafunctions are defined by the following.
+ Other Boost.Range metafunctions are defined by the following.
range_value<const Range>::type is the same as range_value<Range>::type,
range_difference<const Range>::type is the same as std::ptrdiff_t, and
range_pointer<const Range>::type is the same as add_pointer<remove_reference<range_reference<const Range>::type>::type>::type.ATL Ranges
-
@@ -265,7 +540,7 @@ The table below lists the Traversal Category and
-