C 扩展 : <? 和 >?运营商

标签 c gcc max min

我观察到在某个时候有一个 <?>?海湾合作委员会的运营商。我如何在 GCC 4.5 下使用它们?它们是否已被移除,如果是,何时移除?

Offset block_count = (cpfs->geo.block_size - block_offset) <? count;
cpfs.c:473: error: expected expression before ‘?’ token

最佳答案

最近的手册 say :

The G++ minimum and maximum operators (‘<?’ and ‘>?’) and their compound forms (‘<?=’) and ‘>?=’) have been deprecated and are now removed from G++. Code using these operators should be modified to use std::min and std::max instead.

快速搜索过去的文档似乎表明它们在 4.0 版本左右被删除了(3.4.6 包括它们,4.0.4 没有)。

关于C 扩展 : <? 和 >?运营商,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40233683/

相关文章:

我可以在不关闭 fd 的情况下关闭 FILE 吗?

c - 我编写的这个程序的递归函数是什么,用于添加一个五位数的所有数字

c++ - 我如何检查重构时我没有破坏任何东西?

c++ - 在 C/C++ 中确定编译时的核心数

c++ - 在 if-else if 链中使用 Likely()/Unlikely() 预处理器宏

matlab - 如何将矩阵中的一行设置为 0?

objective-c - 在 iOS 中使用 clock() 函数获取 tics

c - 这段代码有什么问题?

java - 最大和最小数量

java - 使用 for 循环实现 max 的奇怪问题