~/talk

Fixing Two-Phase Initialization

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

Claims a concrete idiom: a preconstruct member function that does all fallible work and returns a construction token carrying the initialized state, then a noexcept constructor consumes the token. Implements this instead of private-create or two-phase init, avoids partially initialized objects in no-exception builds, and it works with make_shared and emplace_back so libraries like containers and smart pointers accept it; implementation is built and demonstrated to work.

AI-written summary · about

  1. 0:00The problem with constructors
  2. 0:42Two-phase initialization
  3. 1:32Static factory methods
  4. 2:52Inverse two-phase initialization
~/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.