我观察到在某个时候有一个 <?
和 >?
海湾合作委员会的运营商。我如何在 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 usestd::min
andstd::max
instead.
快速搜索过去的文档似乎表明它们在 4.0 版本左右被删除了(3.4.6 包括它们,4.0.4 没有)。
关于C 扩展 : <? 和 >?运营商,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40233683/