~/talk

rof_egnar reversed adapter for(auto x:reversed(range))

Talkat CppCon 2018 · 2018-09-23..09-28· [rust]
slides:none on file

Describes a reversible range-for adapter that initially keeps references and therefore uses-after-free when fed temporaries; testing counts constructions and destructions to prove temporaries die before loop body sees elements. Uses C++17 class template argument deduction and special-cases initializer_list, then provides an rvalue overload that holds the container by value (moves in) so the temporary lives for the loop. Proposes deleting begin on temporaries to prevent misuse.

AI-written summary · about

~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.