![]() |
|
Four types of objects are currently supported by the library:
std::pair<iterator,iterator>
char[],wchar_t[],
char*, and wchar_t*)
iterator_range implements the minimal interface required to make the class
a Forward Range.
Please also see Range concepts for more details.
namespace boost
{
//
// Single Pass Range metafunctions
//
template< class T >
struct value_type_of;
template< class T >
struct iterator_of;
template< class T >
struct const_iterator_of;
//
// Forward Range metafunctions
//
template< class T >
struct difference_type_of;
template< class T >
struct size_type_of;
//
// Bidirectional Range metafunctions
//
template< class T >
struct reverse_iterator_of;
template< class T >
struct const_reverse_iterator_of;
//
// Special metafunctions
//
template< class T >
struct result_iterator_of;
template< class T >
struct reverse_result_iterator_of;
//
// Single Pass Range functions
//
template< class T >
inline typename iterator_of<T>::type
begin( T& c );
template< class T >
inline typename const_iterator_of<T>::type
begin( const T& c );
template< class T >
inline typename iterator_of<T>::type
end( T& c );
template< class T >
inline typename const_iterator_of<T>::type
end( const T& c );
template< class T >
inline bool
empty( const T& c );
//
// Forward Range functions
//
template< class T >
inline typename size_type_of<T>::type
size( const T& c );
//
// Bidirectional Range functions
//
template< class T >
inline typename reverse_iterator_of<T>::type
rbegin( T& c );
template< class T >
inline typename const_reverse_iterator_of<T>::type
rbegin( const T& c );
template< class T >
inline typename reverse_iterator_of<T>::type
rend( T& c );
template< class T >
inline typename const_reverse_iterator_of<T>::type
rend( const T& c );
} // namespace 'boost'
| Type | Object | Describes |
|---|---|---|
X
| x
| any type |
T |
t
| denotes behavior of the primary templates |
P
| p
| denotes std::pair<iterator,iterator>
|
A[sz]
| a
| denotes an array of type A of size sz
|
Char*
| s
| denotes either char* or wchar_t*
|
Please notice in tables below that when four lines appear in a cell, the first line will describe the primary template, the second line pairs of iterators, the third line arrays and the last line null-terminated strings.
The special metafunctions result_iterator_of and
reverse_result_iterator_of 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.
(C) Copyright Thorsten Ottosen 2003-2004