Function at

Summary

#include <include/EASTL/array.h>

(1) EA_CPP14_CONSTEXPR const_reference at(size_type i) const

(2) EA_CPP14_CONSTEXPR reference at(size_type i)

Function overload

Synopsis

#include <include/EASTL/array.h>

EA_CPP14_CONSTEXPR const_reference at(size_type i) const

Description

No description yet.

Source

Lines 373-386 in include/EASTL/array.h. Line 117 in include/EASTL/array.h.

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

Synopsis

#include <include/EASTL/array.h>

EA_CPP14_CONSTEXPR reference at(size_type i)

Description

No description yet.

Source

Lines 389-402 in include/EASTL/array.h. Line 118 in include/EASTL/array.h.

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





Add Discussion as Guest

Log in