[ 2020-01 Priority set to 3 after review on the reflector. ]
Previous resolution [SUPERSEDED]:
This wording is relative to N4842.
Modify [range.range] as indicated:
template<class T> concept safe_range = range<T> && (is_lvalue_reference_v<T> || enable_safe_range<remove_cvref_t<T>>);-5-
Given an expression E such that decltype((E)) is T,A type T models safe_rangeonlyif:
(5.1) — is_lvalue_reference_v<T> is true, or
(5.2) — given an expression E such that decltype((E)) is T,
ifthe validity of iterators obtained from the object denoted by E is not tied to the lifetime of that object.-6- [Note:
Since the validity of iterators is not tied to the lifetime of an object whose type models safe_range, aA function can accept arguments ofsucha type that models safe_rangeby valueand return iterators obtained from it without danger of dangling. — end note]