From 6ac0cfe09c09ce5c6ec631129b96c6e668994725 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thorsten=20J=C3=B8rgen=20Ottosen?=
-
-
- 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
-
@@ -309,11 +348,10 @@ class=identifier>T&
range_reverse_iterator<X>::type
- 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
Notice that the above functions should always be called with
+ qualification (boost::
) to prevent unintended
+ Argument Dependent Lookup (ADL).
+