diff --git a/doc/boost_range.html b/doc/boost_range.html index e652436..d8d956d 100644 --- a/doc/boost_range.html +++ b/doc/boost_range.html @@ -94,14 +94,6 @@ class=identifier>range_difference; struct range_reverse_iterator; - - // - // Random Access Range metafunctions - // - - template< class T > - struct range_size; // // Single Pass Range functions @@ -112,7 +104,7 @@ class=identifier>range_size; begin( T& c ); template< class T > - typename range_iterator<T>::type + typename range_iterator<const T>::type begin( const T& c ); template< class T > @@ -120,7 +112,7 @@ class=identifier>range_size; end( T& c ); template< class T > - typename range_iterator<T>::type + typename range_iterator<const T>::type end( const T& c ); template< class T > @@ -144,7 +136,7 @@ class=identifier>range_size; rbegin( T& c ); template< class T > - typename range_reverse_iterator<T>::type + typename range_reverse_iterator<const T>::type rbegin( const T& c ); template< class T > @@ -152,11 +144,10 @@ class=identifier>range_size; rend( T& c ); template< class T > - typename range_reverse_iterator<T>::type + typename range_reverse_iterator<const T>::type rend( const T& c ); - // // Random Access Range functions // @@ -164,7 +155,7 @@ class=identifier>T& template< class T > typename range_size<T>::type size( const T& c ); - + // // Special const Range functions // @@ -247,10 +238,8 @@ class=identifier>T&
range_value<X>::type
T::value_type
boost::iterator_value<P::first_type>::type
A
Char
+ boost::iterator_value<range_iterator<X>::type>::type
+ range_const_iterator<X>::type
range_iterator<const X>::type
T::const_iterator
P::first_type
const A*
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
range_size<X>::type
T::size_type
std::size_t
std::size_t
std::size_t
range_reverse_iterator<X>::type
boost::reverse_iterator< typename range_iterator<T>::type >
boost::reverse_iterator<range_iterator<X>::type>
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>
range_reverse_result_iterator<X>::type
boost::reverse_iterator< typename range_result_iterator<T>::type
- >
-
- 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.
size()
@@ -520,10 +489,6 @@ class=identifier>T& const_iterator
size_type
@@ -554,26 +519,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 +586,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 +595,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 +613,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 +644,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 +653,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 +664,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
-