~/talk

Warning: std::find() is Broken!

Talkat CppCon 2021 · on Friday, 2021-10-29· at 16:15· A) Aurora C/D, online· [frontend-architecture]
links:none on file
slides:none on file

Claim: std::find’s specification omits the domain of equal so behavior depends on hidden preconditions, producing divergent results for cases like NaN not equal to NaN and failing examples that appear to “work” on some libraries but not others. Demonstrations use a buggy remove_if where a predicate copied resets counters, a fast Bresenham variant exploiting unsigned modulo arithmetic, and tooling evidence from clang static analyzer and UBSan. Result: implementations differ; fixes require explicit contract, stronger concepts, or documented invariants.

AI-written summary · about

  1. 0:00Intro
  2. 0:56Welcome
  3. 3:24How Software Works
  4. 4:36Tony Hor
  5. 5:04Horlogic
  6. 6:59Math Symbols
  7. 10:27Static Analyzer
  8. 11:33Design by Contract
  9. 12:10Pre and Post Conditions
  10. 13:28Class Invariant
  11. 14:31Implementation Limitations
  12. 15:52Formal Methods
  13. 17:12Harshas Law
  14. 17:52Removing odd numbers
  15. 23:48Safety
  16. 24:37Safety definition
  17. 26:18Requirements for correctness
  18. 29:03Strong safety
  19. 29:57Undefined behaviour
  20. 30:51Example of undefined behaviour
  21. 33:40Weakening preconditions
  22. 34:11Is this a good thing
  23. 34:42Its complicated
  24. 35:40Line drawing algorithm
  25. 37:27accumulator
  26. 38:47modulo
  27. 39:51wrap around
  28. 42:53modular arithmetic
  29. 44:05behavior
  30. 45:26strong preconditions
  31. 48:44concepts
  32. 54:35guarantee
  33. 54:59distance
  34. 58:13random access requirements
~/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.