lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: for_UP_and_DOWN


From: Graham Percival
Subject: Re: for_UP_and_DOWN
Date: Sun, 15 Apr 2012 16:26:24 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Apr 15, 2012 at 05:16:07PM +0200, David Kastrup wrote:
> Actually, with option -std=c++0x GCC would accept
> 
> for (Direction d : { UP, DOWN })
> {
>    ...
> }
> 
> and that would be readable enough without having to revert to macros.

I like that solution, but I'm iffy about relying on compiler
support for elements of languages that are less than 10 years old.
For examples, does clang++ support that?  gcc 4.1.2 (which is what
GUB has)?  gcc 3.4 or whatever openbsd still uses?  etc.

If we use a macro, then at least we could change the definition in
one place in order to work around old/broken compilers.

- Graham



reply via email to

[Prev in Thread] Current Thread [Next in Thread]