struct byte { typedef unsigned char value_type; value_type v; byte(const byte&b):v(b.v){}; explicit byte(const unsigned char v_):v(v_){}; void swap(byte&b) {std::swap(v, b.v);}; value_type value() {return v;} bool iszero() {return !v;} byte& operator=(const byte&b) {byte tmp = b; swap(tmp); return *this;} bool operator==(const byte&b) const {return v==b.v;}; bool operator!=(const byte&b) const {return v!=b.v;}; bool operator<=(const byte&b) const {return v<=b.v;}; bool operator>=(const byte&b) const {return v>=b.v;}; bool operator< (const byte&b) const {return v< b.v;}; bool operator> (const byte&b) const {return v> b.v;}; byte operator| (const byte&b) const {return byte(v|b.v);}; byte operator& (const byte&b) const {return byte(v&b.v);}; byte operator^ (const byte&b) const {return byte(v^b.v);}; byte&operator|=(const byte&b) {return *this=(*this|b);} byte&operator&=(const byte&b) {return *this=(*this&b);} byte&operator^=(const byte&b) {return *this=(*this^b);} byte operator~ () const {return byte(~v);}; byte operator<<(int a) const {return byte(v<<a);}; byte operator>>(int a) const {return byte(v>>a);};};
A byte class that takes the same storage as an unsigned char that should be reduced by any decent optimizer to being just an unsigned char -- but is type incompatable with unsigned chars.