On Friday, January 13, 2012, [email protected] wrote:
> if (markerTime < currentTime  and markerTime > closestPrevious) {

> while (not commands.empty()) {

> (And can somebody clue me in on where the "and" and "not" macros are
> coming from that are used in here?  Bizarre.)

This turns out to be an interesting research project.  According to various 
blurbs on Stack Overflow, apparently these alternative keywords have been part 
of the C++ standard for a long time, and they were defined to aid people with 
non-English keyboards or something.

This code snippet...

int main(int argc, char *argv[])
{
    int a = 1;
    int b = 2;
    bool foo = false;

    if (a < 1 or b > 3 and not foo)
    {
       return 1;
    }
    return 0;
}


...compiles and runs using 'g++ foo.cpp' with no includes, no defines, no 
command line arguments, etc.

The same snippet fails multiple times when attempting to compile it as C.

Well, that's my something new for today.
-- 
D. Michael McIntyre

------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to