BloombergLP::bslstl::Variant_CountCVType

Count occurrences of t_TYPE in t_HEAD, t_TAIL..., ignoring cv-quals.

Synopsis

Declared in <bslstl_variant.h>

template<
    class t_TYPE,
    class t_HEAD = BSLSTL_VARIANT_NOT_A_TYPE,
    class... t_TAIL>
struct Variant_CountCVType
    : bsl::integral_constant<size_t, bsl::is_same<typename bsl::remove_cv<t_TYPE>::type, typename bsl::remove_cv<t_HEAD>::type>::value + Variant_CountCVType<t_TYPE, t_TAIL...>::value>

Description

This component-private metafunction calculates the number of times (template parameter) t_TYPE occurs in (template parameters) t_HEAD, t_TAIL..., where two types that differ only in top-level cv-qualification are considered to be the same.

Base Classes

NameDescription
bsl::integral_constant<size_t, bsl::is_same<typename bsl::remove_cv<t_TYPE>::type, typename bsl::remove_cv<t_HEAD>::type>::value + Variant_CountCVType<t_TYPE, t_TAIL...>::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
Variant_CountCVType<t_TYPE, BSLSTL_VARIANT_NOT_A_TYPE> Specialization for purposes of the sim_cpp11_features.pl script.