~/lightning

Lightning Talk: Required Field for Designated Initialization

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

Shows a concrete pattern: wrap mandatory members in a required_field wrapper that has a single-argument constructor so aggregates still initialize but missing values fail to compile. Explains why default member initializers or ordinary constructors don't solve the Vulkan-style s-type and pipeline-layout requirement: defaults hide missing crucial pointers, constructors break aggregate initialization. Demonstrates that client code needs no changes and that compile-time enforcement replaces runtime undefined behavior.

AI-written summary · about

  1. 0:00Start
  2. 1:01You can't force people to use brace initializations
  3. 1:56In C++11 we get default member initializer
  4. 3:00Constructor?
  5. 3:26A required field class
~/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.