bsl::is_fundamental

Standard meta-function for detecting fundamental types.

Synopsis

Declared in <bslmf_isfundamental.h>

template<class t_TYPE>
struct is_fundamental
    : integral_constant<bool, is_arithmetic<t_TYPE>::value || is_void<t_TYPE>::value>

Description

This struct template implements a meta-function for checking if a type is fundamental as defined in the C++11 standard [basic.fundamental]. Note that this is subtly differemt from bslmf::IsFundamental, which also returns true_type for references to fundamental types.

Base Classes

NameDescription
integral_constant<bool, is_arithmetic<t_TYPE>::value || is_void<t_TYPE>::value>Metafunction representing a compile-time constant of the specified (template parameter) t_TYPE with the specified (template parameter) t_VALUE.

Type Aliases

NameDescription
type Alias for this integral_constant specialization.
value_type Alias for the (template parameter) t_TYPE.

Member Functions

NameDescription
operator() Return a copy of the template argument t_VALUE.
operator t_TYPE Return a copy of the template argument t_VALUE.

Static Data Members

NameDescription
value The compile-time constant value of this metafunction.

Specializations

NameDescription
is_fundamental<bsl::nullptr_t> Explicit specialization to confirm that the type of nullptr is fundamental.
is_fundamental<bsl::nullptr_t volatile> Explicit specialization to confirm that the type of volatile nullptr is fundamental.
is_fundamental<bsl::nullptr_t const> Explicit specialization to confirm that the type of const nullptr is fundamental.
is_fundamental<bsl::nullptr_t const volatile> Explicit specialization to confirm that the type of const volatile nullptr is fundamental.