Skip to content

Commit f4326a8

Browse files
authored
support unsigned right shift operator
1 parent 1985ea0 commit f4326a8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

standard/classes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4930,7 +4930,7 @@ binary_operator_declarator
49304930
49314931
overloadable_binary_operator
49324932
: '+' | '-' | '*' | '/' | '%' | '&' | '|' | '^' | '<<'
4933-
| right_shift | '==' | '!=' | '>' | '<' | '>=' | '<='
4933+
| right_shift | unsigned_right_shift | '==' | '!=' | '>' | '<' | '>=' | '<='
49344934
;
49354935
49364936
conversion_operator_declarator
@@ -5025,7 +5025,7 @@ The `true` and `false` unary operators require pair-wise declaration. A compile-
50255025
The following rules apply to binary operator declarations, where `T` denotes the instance type of the class or struct that contains the operator declaration:
50265026
50275027
- A binary non-shift operator shall take two parameters, at least one of which shall have type `T` or `T?`, and can return any type.
5028-
- A binary `<<` or `>>` operator ([§12.14](expressions.md#1214-shift-operators)) shall take two parameters, the first of which shall have type `T` or `T?` and the second of which shall have type `int` or `int?`, and can return any type.
5028+
- A binary `<<`, `>>`, or `>>>` operator ([§12.14](expressions.md#1214-shift-operators)) shall take two parameters, the first of which shall have type `T` or `T?` and the second of which shall have type `int` or `int?`, and can return any type.
50295029
50305030
The signature of a binary operator consists of the operator token (`+`, `-`, `*`, `/`, `%`, `&`, `|`, `^`, `<<`, `>>`, `==`, `!=`, `>`, `<`, `>=`, or `<=`) and the types of the two parameters. The return type and the names of the parameters are not part of a binary operators signature.
50315031

0 commit comments

Comments
 (0)