deref
template<
typename Iterator
>
struct deref
{
typedef typename Iterator::type type;
};
Dereferences an iterator.
#include "boost/mpl/deref.hpp"
| Parameter | Requirement | Description |
|---|---|---|
Iterator | A model of Trivial Iterator | An iterator to be dereferenced. |
| Expression | Expression type | Precondition | Semantics | Postcondition |
|---|---|---|---|---|
typedef deref<Iterator>::type t; | A type | Equivalent to typedef Iterator::type t;. | Iterator is dereferenceable |
Amortized constant time.
typedef list<char,short,int,long> types; typedef begin<types>::type iter; BOOST_STATIC_ASSERT(boost::is_same< deref<iter>::type,char >::value));