Files
cppdraft_translate/cppdraft/span/iterators.md
2025-10-25 03:02:53 +03:00

2.6 KiB
Raw Blame History

[span.iterators]

23 Containers library [containers]

23.7 Views [views]

23.7.2 Contiguous access [views.contiguous]

23.7.2.2 Class template span [views.span]

23.7.2.2.7 Iterator support [span.iterators]

🔗

using iterator = implementation-defined;

1

#

The type models contiguous_iterator ([iterator.concept.contiguous]), meets the Cpp17RandomAccessIterator requirements ([random.access.iterators]), and meets the requirements for constexpr iterators ([iterator.requirements.general]), whose value type is value_type and whose reference type is reference.

2

#

All requirements on container iterators ([container.reqmts]) apply tospan::iterator as well.

🔗

constexpr iterator begin() const noexcept;

3

#

Returns: An iterator referring to the first element in the span.

If empty() is true, then it returns the same value as end().

🔗

constexpr iterator end() const noexcept;

4

#

Returns: An iterator which is the past-the-end value.

🔗

constexpr reverse_iterator rbegin() const noexcept;

5

#

Effects: Equivalent to: return reverse_iterator(end());

🔗

constexpr reverse_iterator rend() const noexcept;

6

#

Effects: Equivalent to: return reverse_iterator(begin());