View Template Library

dereference<T>

Category: functors

Component type: type

Description

dereference<T> is a function object. Specifically, it is an Adaptable Unary Function, which means it is a function object that promotes a pointer to a reference. If f is a pointer to an object of class dereference<T> and x is a pointer to an object of class T, then f(x) returns *x.

Example



Definition

Defined in functors.hpp.

Template parameters

Parameter

Description

Default

T

The type of dereference's arguments.


Model of

Adaptable Unary Function, DefaultConstructible

Type requirements

T has an operator*(). std::iterator_traits<> has been specialized for T.

Public base classes

unary_function<T,std::iterator_traits<T>::reference>.

Members

Member

Where defined

Description

argument_type

Adaptable Unary Function

The type of the tmplate argument: T

result_type

Adaptable Unary Function

The type of the result: std::iterator_traits<T>::reference

dereference()

DefaultConstructible

The default constructor.

bool operator()(const T& x)

Unary Function

Function call operator. The return value is T::operator*(x).

New members

All of dereference's members are defined in the Adaptable Unary Function and DefaultConstructible requirements. dereference does not introduce any new members.

Notes

See also

The function object overview, Adaptable Unary Function


VTL Home
Copyright © 1999 Konrad-Zuse-Zentrum für Informationstechnik Berlin & Gary Powell All Rights Reserved.