~/talk

unsigned: A Guideline for Better Code

Talkat CppCon 2016 · 2016-09-18..09-23· [software-architecture]
name:Jon Kalb
github:boostcon
slides:none on file

Example compares signed -1 with unsigned 1 and prints "else: a is not less than b" because the signed value promotes and becomes large — surprising even experienced programmers. Recommendation: don't use unsigned for quantities, reserve unsigned for bitmasks, character bytes, or raw bit containers. Choose types for the operations they must support, not just range; prefer a larger signed type to avoid hidden bugs; note that size_t is unsigned for historic reasons but does not justify exposing unsigned in APIs.

AI-written summary · about

  1. 0:00Start
  2. 0:27What does this code do?
  3. 1:46What Guideline Will Help?
  4. 5:44Recommendations
~/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.