-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
In case of overflow:
int arr[] = { 0, 1 , 2 };
ring_span<int> rs( arr, arr + dim(arr), arr + 1, 3 );
ring-span-lite/include/nonstd/ring_span.hpp
Lines 432 to 445 in dfb7c34
template< class ContiguousIterator > | |
ring_span( | |
ContiguousIterator begin | |
, ContiguousIterator end | |
, ContiguousIterator first | |
, size_type size | |
, Popper popper = Popper() | |
) nsrs_noexcept | |
: m_data ( &* begin ) | |
, m_size ( size ) | |
, m_capacity ( static_cast<size_type>( end - begin ) ) | |
, m_front_idx( static_cast<size_type>( first - begin ) ) | |
, m_popper ( std11::move( popper ) ) | |
{} |
Should
assert(first + size <= end);
be added?Metadata
Metadata
Assignees
Labels
No labels