~/talk

Introduction to proposed std::expected

Talkat Meeting C++ 2017 · 2017-11-09..11-11· [rust]
links:none on file
slides:none on file

Post‑Toronto std::expected T, E aims for WG21 adoption around C++20 and promises an optional‑like API plus monadic operators and an operator try proposal to reduce the boilerplate of nested ifs. Benchmarks show exception unwinds costing on the order of tens of thousands of CPU cycles versus predictable expected returns. A construct‑shim and two‑phase construction pattern appears for no‑throw object creation (used in the AFIO file‑handle example), and an outcome bridging implementation is already compiled to interoperate with Boost Outcome.

AI-written summary · about

  1. 0:00Start
  2. 9:27Failure handling logic is as important or more important than success handling logic? • The cost of fully testing your code for exception safety isn't worth it to your organisation? Code peer review checks correctness of failure handling first?
  3. 25:36Use in functional programming
  4. 39:25Implementing object construction with Expected
~/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.