[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnu c++ min and max extensions
From: |
Sasa Petrovic |
Subject: |
gnu c++ min and max extensions |
Date: |
Fri, 5 Dec 2008 10:09:21 -0800 (PST) |
User-agent: |
G2/1.0 |
I remember reading that there are C++ extensions in g++ that allow for
the following syntax:
int i = a <? b;
which should assign i the minimum of a and b. However, trying to
compile:
int main(void)
{
int i = 1, j = 2;
i <?= j;
}
gives me a syntax error:
main.cpp: In function ‘int main()’:
main.cpp:4: error: expected primary-expression before ‘?’ token
main.cpp:4: error: expected primary-expression before ‘=’ token
main.cpp:4: error: expected `:' before ‘;’ token
main.cpp:4: error: expected primary-expression before ‘;’ token
What happened to these extensions (are they still around)? Btw I'm
using GCC version 4.2.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnu c++ min and max extensions,
Sasa Petrovic <=