File tree Expand file tree Collapse file tree 1 file changed +15
-17
lines changed Expand file tree Collapse file tree 1 file changed +15
-17
lines changed Original file line number Diff line number Diff line change 3073
3073
\terminal {operator} operator
3074
3074
\end {bnf }
3075
3075
3076
- \begin {bnfkeywordtab }
3076
+ \begin {bnf }
3077
+ % % Ed. note: character protrusion would misalign various operators.
3078
+ \microtypesetup {protrusion=false}\obeyspaces
3077
3079
\nontermdef {operator} \textnormal {one of}\br
3078
- \> new\> delete\> new[]\> delete[]\> ( \, ) \> [ \, ] \> -> \> ->*\>\~ \br
3079
- \> ! \> + \> - \> * \> / \>\%\> \ caret\>\&\> | \br
3080
- \> = \> += \> -= \> *= \> /= \>\% = \> \ caret= \>\& = \> |= \br
3081
- \> ={=} \> != \> < \> > \> <= \> >= \> <=>\>\ &\&\> |{ |}\br
3082
- \> << \> >> \> <<=\> >>= \> ++ \> -{-} \> , \br
3083
- \end {bnfkeywordtab }
3080
+ \terminal { new delete new[] delete[] ( \rlap { \, )} [ \rlap { \, ]} -> ->* \~ } \br
3081
+ \terminal {! + - * / \% \ caret{} \& |} \br
3082
+ \terminal {= += -= *= /= \% = \ caret{}= \& = |=} \br
3083
+ \terminal {== != < > <= >= <=> \ &\& | |}\br
3084
+ \terminal {<< >> <<= >>= ++ -- ,} \br
3085
+ \end {bnf }
3084
3086
\begin {note }
3085
3087
The last two operators are function call\iref {expr.call }
3086
3088
and subscripting\iref {expr.sub }.
3097
3099
3098
3100
\pnum
3099
3101
Both the unary and binary forms of
3100
-
3101
- \begin {codeblock }
3102
- + - * &
3103
- \end {codeblock }
3104
-
3102
+ \begin {ncsimplebnf }\obeyspaces
3103
+ \terminal {+ - * \& }
3104
+ \end {ncsimplebnf }
3105
3105
can be overloaded.
3106
3106
3107
3107
\pnum
3108
3108
\indextext {restriction!operator overloading}%
3109
3109
The following operators cannot be overloaded:
3110
-
3111
- \begin {codeblock }
3112
- . .* :: ?:
3113
- \end {codeblock }
3114
-
3110
+ \begin {ncsimplebnf }\obeyspaces
3111
+ \terminal {. .* :: ?:}
3112
+ \end {ncsimplebnf }
3115
3113
nor can the preprocessing symbols
3116
3114
\tcode {\# }
3117
3115
and
You can’t perform that action at this time.
0 commit comments