Блог пользователя Abinash

Автор Abinash, 9 лет назад, По-английски

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 ?

  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится

»
9 лет назад, # |
Rev. 5   Проголосовать: нравится +7 Проголосовать: не нравится

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