Function at
Summary
#include <include/EASTL/bitvector.h>
(1) reference at(size_type n)
(2) const_reference at(size_type n) const
Function overload
Synopsis
#include <include/EASTL/bitvector.h>
reference at(size_type n)
Description
No description yet.
Source
Lines 1033-1050 in include/EASTL/bitvector.h. Line 291 in include/EASTL/bitvector.h.
template <typename Allocator, typename Element, typename Container>
typename bitvector<Allocator, Element, Container>::reference
bitvector<Allocator, Element, Container>::at(size_type n)
{
// The difference between at and operator[] is that at signals
// if the requested position is out of range by throwing an
// out_of_range exception.
#if EASTL_EXCEPTIONS_ENABLED
if(EASTL_UNLIKELY(n >= size()))
throw std::out_of_range("bitvector::at -- out of range");
#elif EASTL_ASSERT_ENABLED
if(EASTL_UNLIKELY(n >= size()))
EASTL_FAIL_MSG("bitvector::at -- out of range");
#endif
return *(begin() + (difference_type)n);
}
Synopsis
#include <include/EASTL/bitvector.h>
const_reference at(size_type n) const
Description
No description yet.
Source
Lines 1053-1066 in include/EASTL/bitvector.h. Line 292 in include/EASTL/bitvector.h.
template <typename Allocator, typename Element, typename Container>
typename bitvector<Allocator, Element, Container>::const_reference
bitvector<Allocator, Element, Container>::at(size_type n) const
{
#if EASTL_EXCEPTIONS_ENABLED
if(EASTL_UNLIKELY(n >= size()))
throw std::out_of_range("bitvector::at -- out of range");
#elif EASTL_ASSERT_ENABLED
if(EASTL_UNLIKELY(n >= size()))
EASTL_FAIL_MSG("bitvector::at -- out of range");
#endif
return *(begin() + (difference_type)n);
}