...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Deferences an iterator.
template<
typename I
>
typename result_of::deref
<I>::type deref(I const& i);
Table 1.1. Parameters
Parameter |
Requirement |
Description |
---|---|---|
|
Model of Forward Iterator |
Operation's argument |
deref
(i);
Return type: result_of::deref
<I>::type
Semantics: Dereferences the iterator
i
.
#include <boost/fusion/iterator/deref.hpp> #include <boost/fusion/include/deref.hpp>
typedefvector
<int,int&> vec; int i(0); vec v(1,i); assert(deref
(begin
(v)) == 1); assert(deref
(next
(begin
(v))) == 0); assert(&(deref
(next
(begin
(v)))) == &i);