cannot evalute mixin(uuid("bla")) at compile time
Steven Schveighoffer
schveiguy at yahoo.com
Wed Aug 4 13:00:59 PDT 2010
On Wed, 04 Aug 2010 14:52:14 -0400, Philippe Sigaud
<philippe.sigaud at gmail.com> wrote:
> 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.
Hm..., then shouldn't that be is(typeof(...))?
-Steve
More information about the Digitalmars-d-learn
mailing list