[range.counted] (original) (raw)

25 Ranges library [ranges]

25.7 Range adaptors [range.adaptors]

25.7.19 Counted view [range.counted]

Let E and F be expressions, let T be decay_t<decltype((E))>, and let D be iter_difference_t<T>.

If decltype((F)) does not modelconvertible_to<D>,views​::​counted(E, F) is ill-formed.

[Note 1:

This case can result in substitution failure when views​::​counted(E, F)appears in the immediate context of a template instantiation.

— _end note_]

Otherwise, views​::​counted(E, F)is expression-equivalent to: