Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/mpl/doc/src/refmanual/deref.rst @ 12

Last change on this file since 12 was 12, checked in by landauf, 18 years ago

added boost

File size: 1.5 KB

deref

Synopsis

template<
      typename Iterator
    >
struct deref
{
    typedef |unspecified| type;
};

Description

Dereferences an iterator.

Parameters

Parameter Requirement Description
Iterator |Forward Iterator| The iterator to dereference.

Expression semantics

For any |Forward Iterator|s iter:

typedef deref<iter>::type t;
Return type:

A type.

Precondition:

iter is dereferenceable.

Semantics:

t is identical to the element referenced by iter. If iter is a user-defined iterator, the library-provided default implementation is equivalent to

typedef iter::type t;

Complexity

Amortized constant time.

Example

typedef vector<char,short,int,long> types;
typedef begin<types>::type iter;
BOOST_MPL_ASSERT(( is_same< deref<iter>::type, char > ));

Docutils System Messages

???????
Note: See TracBrowser for help on using the repository browser.