Talk:cpp/ranges/lazy split view

non_propagating_cache or non_cache_propagating?
In the Data members section the third bullet describes the current_ object being of std-like exposition-only type. Then it states that it caches the result of the calls. This seems to conflict with the comment annotation. Could you elaborate what the comment annotation means (and whether it should be non_cache_propagating instead)? ticotico (talk) 05:57, 9 February 2022 (PST)


 * Hi, Javier.
 * 1. We have to use "the comment annotations" like or  to denote exposition-only names from the Standard. Originally, such names are introduced using italic style, e.g., meaning that they are not the subject of standardization.


 * Cppreference editors have to imitate this italic style which is tricky because we do not fully control the source-code highlighter (GeShi) used under the hood. (Many things are possible but it takes time.) Alternative approach is to use "normal" identifiers, such as (prefixed Pascal style) or  (prefixed standard-style).


 * 2. is necessary to satisfy the amortized constant time requirement on iterators. In practice, this means that the first access to the element via the iterator might be done in linear time, while all the following use the cached value (i.e. be performed in O(1) time).
 * Non-propagating part of the name suggests that when the view-adaptor is copied/moved, the cached value in the "non-propagating" member should not be copied/moved but be reset to the empty state.
 * In addition, implementations use EBO when appropriate to reduce the size of the view adaptors if certain private members are present only conditionally.
 * --Space Mission (talk) 07:12, 10 February 2022 (PST)