Function operator[]

Summary

#include <include/EASTL/array.h>

(1) EA_CPP14_CONSTEXPR reference operator[](size_type i)

(2) EA_CPP14_CONSTEXPR const_reference operator[](size_type i) const

Function overload

Synopsis

#include <include/EASTL/array.h>

EA_CPP14_CONSTEXPR reference operator[](size_type i)

Description

No description yet.

Source

Lines 278-289 in include/EASTL/array.h. Line 115 in include/EASTL/array.h.

template <typename T, size_t N>
EA_CPP14_CONSTEXPR inline typename array<T, N>::reference
array<T, N>::operator[](size_type i)
{
    #if EASTL_ASSERT_ENABLED
        if(EASTL_UNLIKELY(i >= N))
            EASTL_FAIL_MSG("array::operator[] -- out of range");
    #endif
    EA_ANALYSIS_ASSUME(i < N);
    return mValue[i];
}

Synopsis

#include <include/EASTL/array.h>

EA_CPP14_CONSTEXPR const_reference operator[](size_type i) const

Description

No description yet.

Source

Lines 292-304 in include/EASTL/array.h. Line 116 in include/EASTL/array.h.

template <typename T, size_t N>
EA_CPP14_CONSTEXPR inline typename array<T, N>::const_reference
array<T, N>::operator[](size_type i) const
{
    #if EASTL_ASSERT_ENABLED
        if(EASTL_UNLIKELY(i >= N))
            EASTL_FAIL_MSG("array::operator[] -- out of range");
    #endif
    EA_ANALYSIS_ASSUME(i < N);
    return mValue[i];
}





Add Discussion as Guest

Log in