~/lightning

Lightning Talk: Detecting Constant Folding to Prevent Substitution Failure

Lightningat CppCon 2023 · on Monday, 2023-10-02· [rust]
links:none on file
slides:none on file

Shows a concrete pattern: use __builtin_constant_p to detect when a guard expression is a compile‑time constant and choose if constexpr to avoid instantiating a failing branch, otherwise use a runtime if so the action still compiles. Applies the change to the boost X SML guard-composition (operator&&) so the left-hand constant guard short-circuits and the right-hand check never causes substitution failure. Demonstration compiles and prints the expected value.

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.