~/talk

Constexpr and operator overloading: Why everything is terrible

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

Implements an optional backport for C++11 that breaks when stored T overloads operator&; using plain & on unioned storage triggers wrong codegen. std::addressof lacks a constexpr const overload in C++11 so the easy fix doesn't compile. Reinterpret_cast of the dummy is non-constexpr, static_cast-from-dummy hits the void-cast bug, and the array+decay trick fails because emplacement requires direct construction. Final choice is to use address-of and drop constexpr for now, a pragmatic tradeoff.

AI-written summary · about

  1. 0:00Intro
  2. 0:15Background information
  3. 0:47Operator Arrow
  4. 1:05Operator ref
  5. 1:55Casting
  6. 2:25Handsdown
  7. 2:35Solution
~/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.