On Wed, Aug 4, 2010 at 14:48, Steven Schveighoffer <schveiguy@yahoo.com> 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