~/lightning

Lightning Talk: Direct Aggregate Initialisation

Lightningat CppCon 2021 · on Sunday, 2021-10-24· [typescript]
links:none on file
slides:none on file

C++20 adds direct aggregate initialization: using parentheses triggers aggregate initialization, enabling things like perfect-forwarding into aggregates and making macros with commas work so you can implement in_place_back. It also diverges from braced list-initialization: parentheses allow narrowing, do not perform brace elision for nested aggregates, and do not extend lifetimes of temporaries so you can get a dangling reference. Parens also retain preexisting value‑initialization meaning, producing unexpected zero‑init in some omitted‑initializer cases.

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.