~/talk

Standard Attributes in C and C++

Talkat ACCU 2023 · 2023-04-19..04-22· [c-and-cpp]
links:none on file
slides:none on file

Survey of C and C++ standard attributes with concrete takeaways: use [[deprecated("...")]] with a message and [[nodiscard]] to catch API misuse; [[maybe_unused]] and [[fallthrough]] silence common warnings. Compiler-hint attributes like [[likely]]/[[unlikely]] rarely help and can pessimize code; [[noreturn]] and [[assume(expr)]] enable optimizations but introduce undefined behavior if wrong. C23 adds reproducible and unsequenced (optimizer hints); no_unique_address changes object layout and is not uniformly supported (MSVC differs).

AI-written summary · about

  1. 0:00Standard attributes in C/C++
  2. 2:55What standard attributes are
  3. 17:02Classifying attributes by function
  4. 18:48Deprecated attribute
  5. 21:34Maybe unused attribute
  6. 26:33Fall through attribute
  7. 30:27No discard attribute
  8. 41:54No return attribute
  9. 46:28Carries dependency attribute
  10. 49:40Likely/unlikely attributes
  11. 57:45Assume attribute
  12. 1:07:12No unique address attribute
  13. 1:11:50C23 standard attributes
  14. 1:13:13Reproducible/unsequenced attributes
  15. 1:19:57Ignorability concept
  16. 1:26:21Ignorability rules
  17. 1:31:35Optional semantics for attributes
  18. 1:34:43Future work on attributes
~/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.