Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 32,294 of 33,346    |
|    Seungbeom Kim to All    |
|    Getting the smallest signed type that ca    |
|    15 May 12 21:23:50    |
      From: musiphil@bawi.org              Hi all,              The subject explains itself. Let's say you have a pair of objects, a and b,       of an unsigned integer type U, and you want to calculate their difference       in a signed integer type.              Obviously you cannot simply write "a - b", because that will yield an       unsigned integer value in modulo arithmetic. So you want to write               S d = static_cast |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca