Boost
C++ Libraries
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
This is an older version of Boost and was released in 2024. The current version is 1.89.0.
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&>));