bsl::add_pointer

Metafunction transforming a type into a pointer to that type.

Synopsis

Declared in <bslmf_addpointer.h>

template<class t_TYPE>
struct add_pointer;

Description

This struct template implements the add_pointer meta-function defined in the C++11 standard [meta.trans.ptr], providing an alias, type, that returns the result. If the (template parameter) t_TYPE is not a reference type, then type is an alias to a pointer type that points to t_TYPE; otherwise, type is an alias to a pointer type that points to the type referred to by the reference t_TYPE, unless it is not legal to form such a pointer type, in which case type is an alias for t_TYPE.

Type Aliases

NameDescription
type Alias to a pointer type derived from the (template parameter) t_TYPE.

Specializations

NameDescription
add_pointer<t_TYPE&> Partial specialization of add_pointer for lvalue reference types.
add_pointer<t_TYPE&&> Partial specialization of add_pointer for rvalue reference types.