Files
2025-10-25 03:02:53 +03:00

1.1 KiB
Raw Permalink Blame History

[range.cache.latest.overview]

25 Ranges library [ranges]

25.7 Range adaptors [range.adaptors]

25.7.34 Cache latest view [range.cache.latest]

25.7.34.1 Overview [range.cache.latest.overview]

1

#

cache_latest_view caches the last-accessed element of its underlying sequence so that the element does not have to be recomputed on repeated access.

[Note 1:

This is useful if computation of the element to produce is expensive.

— end note]

2

#

The name views::cache_latest denotes a range adaptor object ([range.adaptor.object]).

Let E be an expression.

The expression views::cache_latest(E) is expression-equivalent tocache_latest_view(E).