Home | Libraries | People | FAQ | More |
Returns the type that will be returned by dereferencing an iterator.
template< typename I > struct deref { typedef unspecified type; };
Table 1.12. Parameters
Parameter |
Requirement |
Description |
---|---|---|
|
Model of Forward Iterator |
Operation's argument |
result_of::deref
<I>::type
Return type: Any type
Semantics: Returns the result of dereferencing
an iterator of type I
.
#include <boost/fusion/iterator/deref.hpp> #include <boost/fusion/include/deref.hpp>
typedefvector
<int,int&> vec; typedef const vec const_vec; typedefresult_of::begin
<vec>::type first; typedefresult_of::next
<first>::type second; typedefresult_of::begin
<const_vec>::type const_first; typedefresult_of::next
<const_first>::type const_second; BOOST_MPL_ASSERT((boost::is_same<result_of::deref
<first>::type, int&>)); BOOST_MPL_ASSERT((boost::is_same<result_of::deref
<second>::type, int&>));