File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -2768,22 +2768,24 @@ meaning of the operators on standard types is given here.
2768
2768
Like the [ arithmetic operators] ( #arithmetic-operators ) , bitwise operators are
2769
2769
syntactic sugar for calls to methods of built-in traits. This means that
2770
2770
bitwise operators can be overridden for user-defined types. The default
2771
- meaning of the operators on standard types is given here.
2771
+ meaning of the operators on standard types is given here. Bitwise ` & ` , ` | ` and
2772
+ ` ^ ` applied to boolean arguments are equivalent to logical ` && ` , ` || ` and ` != `
2773
+ evaluated in non-lazy fashion.
2772
2774
2773
2775
* ` & `
2774
- : And .
2776
+ : Bitwise AND .
2775
2777
Calls the ` bitand ` method of the ` std::ops::BitAnd ` trait.
2776
2778
* ` | `
2777
- : Inclusive or .
2779
+ : Bitwise inclusive OR .
2778
2780
Calls the ` bitor ` method of the ` std::ops::BitOr ` trait.
2779
2781
* ` ^ `
2780
- : Exclusive or .
2782
+ : Bitwise exclusive OR .
2781
2783
Calls the ` bitxor ` method of the ` std::ops::BitXor ` trait.
2782
2784
* ` << `
2783
2785
: Left shift.
2784
2786
Calls the ` shl ` method of the ` std::ops::Shl ` trait.
2785
2787
* ` >> `
2786
- : Right shift.
2788
+ : Right shift (arithmetic) .
2787
2789
Calls the ` shr ` method of the ` std::ops::Shr ` trait.
2788
2790
2789
2791
#### Lazy boolean operators
You can’t perform that action at this time.
0 commit comments