Is it backwards compatible to change an integer from unsigned to signed?

Skip to first unread message

Vitali Lovich

unread,
Apr 16, 2020, 7:45:19 PM4/16/20
to Cap'n Proto
If I change UInt64 to Int64 provided that I know I never sent a value that's > 2^63 - 1 ? Even if I did am I correct that it's the equivalent behaviour of treating it equivalent to a C++ cast?

Ian Denhardt

unread,
Apr 16, 2020, 8:43:09 PM4/16/20
to Cap'n Proto, Vitali Lovich
Yes, this is correct.

Quoting Vitali Lovich (2020-04-16 19:45:05)
> If I change UInt64 to Int64 provided that I know I never sent a value
> that's > 2^63 - 1 ? Even if I did am I correct that it's the equivalent
> behaviour of treating it equivalent to a C++ cast?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Cap'n Proto" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [1]capnproto+...@googlegroups.com.
> To view this discussion on the web visit
> [2]https://groups.google.com/d/msgid/capnproto/CAF8PYMgiuHd1rkxq3go6DuW
> MVF11NbHqbZjDSRf163spUugopg%40mail.gmail.com.
>
> Verweise
>
> 1. mailto:capnproto+...@googlegroups.com
> 2. https://groups.google.com/d/msgid/capnproto/CAF8PYMgiuHd1rkxq3go6DuWMVF11NbHqbZjDSRf163spUugopg%40mail.gmail.com?utm_medium=email&utm_source=footer
Reply all
Reply to author
Forward
0 new messages