> Thanks! this answers more than i asked for.
> I assume the "&" is there to ensure the cast of bits of character than
> the mathematics value in static_cast<const unsigned char&>(c) rite?
> why need the "const"?
static_cast<const unsigned char&>(c) is the same thing (with added
semantics) as *static_cast<const unsigned char*>(&c) so you can see
you're basically intepreting memory a different way. The const is there
for two reasons 1. const safety
(
http://www.parashift.com/c++-faq-lit...rrectness.html) and 2.
to allow for binding an r-value to a reference
(
http://cpptips.hyperformix.com/cpptips/nconst_tmp_ref3)