>?= 运算符是什么意思?
查看这个 C++ BigInt 库并找到 BigInt.cpp 文件。顶部有一条关于兼容性的评论:
此类是为 g++ 编译器编写的,并使用一些 g++ 扩展(例如“long double”和“>?=”运算符)。
>?=
运算符的作用是什么?我在其他地方找不到对它的引用。
Looking through this C++ BigInt library and found the BigInt.cpp file. At the top there is a a comment at the top about compatibility:
This class was written for the g++ compiler and uses some of the g++ extensions (like "long double" and the ">?=" operator).
What does that >?=
operator do? I can't find a reference to it anywhere else.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
它是一个 GCC 扩展,已在 GCC 4.2 版及更高版本中删除。
a >?= b
的等价物是a = max(a,b);
还有一个非常相似的运算符
a 与
a = min(a, b);
含义相同。It's a GCC extension that was removed in GCC version 4.2 and later.
The equivalent of
a >?= b
isa = max(a,b);
There is also a very similar operator
a <?= b
which means the same asa = min(a, b);
.此页面描述了
>?< /code> 是“最大值”运算符,它返回两个数字参数中最大的一个。我猜测
>?=
将其与赋值相结合,如果右侧值较大,则可能通过分配给左侧操作数。This page describes that
>?
is the 'maximum' operator, which returns the largest of its two numeric arguments. I'm guessing that the>?=
combines this with assignment, presumably by assigning to the left-hand operand if the right-hand value is larger.请参阅 C 扩展:?运算符
这是 max-then-assign 运算符:取左侧和右侧中较大的一个,并将其放回左侧。
它已从 g++ 中删除,应替换为
max
(或min
for)
See C extension: <? and >? operators
It's the max-then-assign operator: Take the greater of the left and right sides and stuff it back into the lefthand side.
It's removed from g++ and should be replaced with
max
(ormin
for<?=
)