~/lightning

Direct Aggregate Initialisation

Lightningat ACCU 2022 · 2022-04-06..04-09· [c-and-cpp]
links:none on file
slides:none on file

C++20 lets aggregates be initialized with parentheses, enabling make_shared and emplace_back to perfect‑forward into aggregates and letting macros avoid commas-in-braces. Paren-init differs from brace-init: parens allow narrowing, parens do not perform brace elision for nested aggregates, and parens do not extend the lifetime of temporaries bound to reference members while braces do. Empty parens mean value‑initialization (zeroing), not aggregate initialization, which affects explicit constructors and copy‑list rules.

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.