ysaie

31 / ⚧ / code, music, art, games

──────────────────────────────
🌸 many-shaped creature
✨ too many projects
🚀 cannot be stopped
🌙 stayed up too late
:eggbug: eggbug enjoyer
──────────────────────────────
header image: chapter 8 complete from celeste
avatar: made using this character builder


📩 email
contact@echowritescode.dev

do bitwise operators have an actual definition in the C++ standard? like is the result of a ^ b specified anywhere?

my reason for asking here is (a) i can't find one on cppreference.com and (b) i want to know what happens if you xor two values of different bit widths. does it zero-pad the smaller operand? does it truncate the longer operand? what happens if you say u64_variable ^= u8_variable?

i can obviously figure it out with godbolt for all the compilers i use, but i'd really prefer to rely on the actual standard than on empirical observations of specific compilers


You must log in to comment.

in reply to @ysaie's post: