BloombergLP::bdlb::ArrayUtil::sizer

Return a reference to a char array matching array in length.

Synopsis

Declared in <bdlb_arrayutil.h>

template<
    class TYPE,
    std::size_t LENGTH>
static
char(&
sizer(TYPE(& array)[]))[];

Description

The referenced array has the same number of elements as the specified array of template parameter LENGTH elements of template parameter TYPE. This function is not implemented and can only be used in a non-evaluated context. The function is used together with sizeof to obtain a constant expression with the LENGTH of the array. See BDLB_ARRAYUTIL_SIZE and BDLB_ARRAYUTIL_LENGTH.

Return Value

reference to a char array with the same length as array

Parameters

NameDescription
arrayarray whose length determines the returned type