aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorCody Tapscott <topolarity@tapscott.me>2022-10-30 12:21:37 -0700
committerCody Tapscott <topolarity@tapscott.me>2022-10-30 12:21:37 -0700
commit2f732deb3d15752d4977f04b38718e6896460e69 (patch)
tree89debe4afe10b7d48a207ff07066218493dac53a /lib/std
parent1696434063dd6b09af93fbab04727f91397e2e00 (diff)
downloadzig-2f732deb3d15752d4977f04b38718e6896460e69.tar.gz
zig-2f732deb3d15752d4977f04b38718e6896460e69.zip
stage1: Make `x and false`/`x or true` comptime-known
We need to be careful to respect side-effects/branching in these cases, but otherwise this behaves very similarly to multiplication. `lhs and rhs == false` if either lhs or rhs is comptime-known `false`, just like `lhs * rhs == 0` if either lhs or rhs is comptime-known to be zero. Similar reasoning applies to `lhs or rhs`.
Diffstat (limited to 'lib/std')
0 files changed, 0 insertions, 0 deletions