Re: What is >?

Discussion in 'C++' started by SG, Mar 26, 2013.

  1. SG

    SG Guest

    Am 26.03.2013 15:37, schrieb Blake McBride:
    > lbuf = lbuf >? x;
    > xda = 0 >? cda;
    > indent = indent >? 0;
    > This construct is used in several places. It don't think it is noise
    > becasue ">" is used elsewhere without "?".

    It's the max operator from the old G++ 3.x.x

    a >? b

    was short for

    a > b ? a : b

    with the exception of evaluating the operand expressions only once.
    Since this was a compiler extension that has been removed a couple of
    years ago, you get the code to compile, by making sure you've included
    the <algorithm> header and using


    SG, Mar 26, 2013
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page