On Wed, Aug 4, 2010 at 14:48, Steven Schveighoffer <schveiguy@yahoo.com> wrote:
On Wed, 04 Aug 2010 08:35:18 -0400, Richard Webb <webby@beardmouse.org.uk> wrote:
 
    I haven't worked out whats causing the problem yet, though looking at the Phobos
code i'm not sure what the

      is(char[1 + Range.empty]))

Not sure either, but empty called on a string should be evaluatable at compile time.  You should file a bug with a minimal example.

Isn't that the trick used to test for infinite ranges? Infinite ranges are defined to have an  'enum bool empty = false' member. So, for an infinite range, 1+Range.empty is a compile-time expression that can be used as dimension for a static array.
Else, .empty is a function and I suppose the is() returns false.

Or something like that, anyway.


Philippe