Back to Arangodb

deref

3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/deref.html

3.12.9.12.2 KB
Original Source

| Prev Next | Back Along | Up Home | Full TOC | Front Page / Iterators / Iterator Metafunctions / deref |

deref

Synopsis

template<
      typename Iterator
    >
struct[deref](./deref.html){
    typedef_unspecified_type;
};

Description

Dereferences an iterator.

#include <[boost/mpl/deref.hpp](../../../../boost/mpl/deref.hpp)>

Parameters

ParameterRequirementDescription
IteratorForward IteratorThe iterator to dereference.

Expression semantics

For any Forward Iterators iter:

typedef[deref](./deref.html)<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](./vector.html)<char,short,int,long> types;
typedef[begin](./begin.html)<types>::type iter;[BOOST\_MPL\_ASSERT](./assert.html)(( is_same<[deref](./deref.html)<iter>::type, char > ));

See also

Iterators, begin / end, next

| Prev Next | Back Along | Up Home | Full TOC |

Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |