Lightning Talk: Detecting Constant Folding to Prevent Substitution Failure
summary
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








