This struct template sets the boolean type for the attribute named is_always_equal to bsl::is_empty<ALLOC> if the given (template parameter) ALLOC does not define such an alias (i.e., if false == AllocatorTraits_HasIsAlwaysEqual<ALLOCATOR_TYPE>::value).

Synopsis

Declared in <bslma_allocatortraits.h>

template<class ALLOC>
struct AllocatorTraits_IsAlwaysEqual<ALLOC, false>
    : bsl::is_empty<ALLOC>

Base Classes

Name

Description

bsl::is_empty<ALLOC>

This struct is a meta‐function to determine whether the (template parameter) t_TYPE is an empty class type. This struct derives from bsl::true_type if the t_TYPE is empty, and from bsl::false_type otherwise. This meta‐function has the same syntax as the is_empty meta‐function defined in the C++11 standard [meta.unary.prop]; on C++03 platforms, however, this meta‐function defaults to true_type if t_TYPE is a class or struct with no non‐static data members other than bit‐fields of length 0, no virtual member functions, no virtual base classes, and no base class B for which is_empty<B>::value is false; otherwise is_empty defaults to false_type. Note that this meta‐function will fail to compile for a union that is the same size as an empty class in C++03.

Type Aliases

Name

Description

type

Alias for this integral_constant specialization.

value_type

Member Functions

Name

Description

operator()

Return a copy of the template argument t_VALUE.

operator value_type

Static Data Members

Name

value

Created with MrDocs