bsl::add_const

Metafunction adding a top-level const qualifier to a type.

Synopsis

Declared in <bslmf_addconst.h>

template<class t_TYPE>
struct add_const;

Description

This struct template implements the add_const meta-function defined in the C++11 standard [meta.trans.cv], providing an alias, type, that returns the result. If the (template parameter) t_TYPE is not a reference type, nor a function type, nor already const-qualified at the top-level, then type is an alias to t_TYPE with a top-level const-qualifier added; otherwise, type is an alias to t_TYPE.

Type Aliases

NameDescription
type Alias to t_TYPE with a top-level const-qualifier when applicable.