cannot evalute mixin(uuid("bla")) at compile time

Philippe Sigaud philippe.sigaud at gmail.com
Wed Aug 4 11:52:14 PDT 2010


On Wed, Aug 4, 2010 at 14:48, Steven Schveighoffer <schveiguy at yahoo.com>wrote:

> On Wed, 04 Aug 2010 08:35:18 -0400, Richard Webb <webby at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20100804/48feee34/attachment-0001.html>


More information about the Digitalmars-d-learn mailing list