BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlb::ArrayUtil Struct Reference

#include <bdlb_arrayutil.h>

Static Public Member Functions

template<class TYPE , bsl::size_t LENGTH>
static TYPE * begin (TYPE(&array)[LENGTH])
 
template<class TYPE , bsl::size_t LENGTH>
static TYPE * end (TYPE(&array)[LENGTH])
 
template<class TYPE , bsl::size_t LENGTH>
static bsl::reverse_iterator< TYPE * > rbegin (TYPE(&array)[LENGTH])
 
template<class TYPE , bsl::size_t LENGTH>
static bsl::reverse_iterator< TYPE * > rend (TYPE(&array)[LENGTH])
 
template<class TYPE , bsl::size_t LENGTH>
static bsl::size_t length (TYPE(&array)[LENGTH])
 
template<class TYPE , bsl::size_t LENGTH>
static bsl::size_t size (TYPE(&array)[LENGTH])
 
template<class TYPE , bsl::size_t LENGTH>
static char(& sizer (TYPE(&array)[LENGTH]))[LENGTH]
 

Detailed Description

This struct provides a namespace for a collection of function templates providing access to the length and iterators of statically sized built-in arrays

Member Function Documentation

◆ begin()

template<class TYPE , bsl::size_t LENGTH>
TYPE * bdlb::ArrayUtil::begin ( TYPE(&)  array[LENGTH])
inlinestatic

Return an iterator pointing to the first element of the specified array of template parameter LENGTH elements of template parameter TYPE.

◆ end()

template<class TYPE , bsl::size_t LENGTH>
TYPE * bdlb::ArrayUtil::end ( TYPE(&)  array[LENGTH])
inlinestatic

Return the past-the-end iterator for the specified array of template parameter LENGTH elements of template parameter TYPE.

◆ length()

template<class TYPE , bsl::size_t LENGTH>
bsl::size_t bdlb::ArrayUtil::length ( TYPE(&)  array[LENGTH])
inlinestatic

Return the number of elements in the specified array of template parameter LENGTH elements of template parameter TYPE. This method is synonymous with the size method.

◆ rbegin()

template<class TYPE , bsl::size_t LENGTH>
bsl::reverse_iterator< TYPE * > bdlb::ArrayUtil::rbegin ( TYPE(&)  array[LENGTH])
inlinestatic

Return a reverse iterator pointing to the last element of the specified array of template parameter LENGTH elements of template parameter TYPE.

◆ rend()

template<class TYPE , bsl::size_t LENGTH>
bsl::reverse_iterator< TYPE * > bdlb::ArrayUtil::rend ( TYPE(&)  array[LENGTH])
inlinestatic

Return the past-the-end reverse iterator for the specified array of template parameter LENGTH elements of template parameter TYPE.

◆ size()

template<class TYPE , bsl::size_t LENGTH>
bsl::size_t bdlb::ArrayUtil::size ( TYPE(&)  array[LENGTH])
inlinestatic

Return the number of elements in the specified array of template parameter LENGTH elements of template parameter TYPE. This method is synonymous with the length method.

◆ sizer()

template<class TYPE , bsl::size_t LENGTH>
static char(& bdlb::ArrayUtil::sizer ( TYPE(&)  array[LENGTH]) )[LENGTH]
static

Return a reference to an array of chars with 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.


The documentation for this struct was generated from the following file: