Abinash's blog

By Abinash, 9 years ago, In English

I found misof to use Compound Operator <?= and <? in his Code

Eryx also use those in his Code

I don't understand what ** <?= and <?** means ?

How they works ?

  • Vote: I like it
  • +2
  • Vote: I do not like it

»
9 years ago, # |
Rev. 5   Vote: I like it +7 Vote: I do not like it

A <?= B equals to A = std::min(A, B) and A <? B is std::min(A, B)

But be careful. This operators aren't from C++ standart. Using them you can get compilation error.

UPD It's an old gcc extension. Now they are removed from compiler.

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.

Source