Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C extension: <? and >? operators

Tags:

c

gcc

max

min

I observed that there was at some point a <? and >? operator in GCC. How can I use these under GCC 4.5? Have they been removed, and if so, when?

Offset block_count = (cpfs->geo.block_size - block_offset) <? count; cpfs.c:473: error: expected expression before ‘?’ token 
like image 508
Matt Joiner Avatar asked Aug 09 '10 04:08

Matt Joiner


1 Answers

Recent manuals 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.

A quick search of the past documents seems to indicate that they were removed around version 4.0 (3.4.6 includes them, 4.0.4 does not).

like image 194
Carl Norum Avatar answered Oct 13 '22 12:10

Carl Norum