diff --git a/gsl/gsl_byte b/gsl/gsl_byte index 90885f9..00b4b15 100644 --- a/gsl/gsl_byte +++ b/gsl/gsl_byte @@ -111,10 +111,15 @@ inline constexpr byte to_byte() noexcept // use of byte within span<> to be standards-compliant struct byte { unsigned char v; + explicit operator unsigned char&() { return v; } explicit operator const unsigned char&() const { return v; } friend bool operator==(byte l, byte r) { return l.v == r.v; } friend bool operator!=(byte l, byte r) { return l.v != r.v; } + friend bool operator<(byte l, byte r) { return l.v < r.v; } + friend bool operator<=(byte l, byte r) { return l.v <= r.v; } + friend bool operator>(byte l, byte r) { return l.v > r.v; } + friend bool operator>=(byte l, byte r) { return l.v >= r.v; } }; template ::value>>