[Issue 1017] CTFE doesn't support (string == string)

Don Clugston dac at nospam.com.au
Mon Mar 5 00:53:20 PST 2007


d-bugmail at puremagic.com wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=1017
> 
> 
> fvbommel at wxs.nl changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>          OS/Version|Windows                     |All
> 
> 
> 
> 
> ------- Comment #4 from fvbommel at wxs.nl  2007-03-04 13:19 -------
> (In reply to comment #3)
>> (In reply to comment #1)
>>> Put equals() before main() and it should work.
>> Under which platform did you observe a dependency on the order of declarations
>> in this instance?  Clearly not that on which the reporter reported the problem.
> 
> Actually, it could be the same as the reporter. My test of Walter's theory was
> done on Linux, while the reporter is appears to be using Windows.
> I have no idea if it works on Windows if the order is switched, but I _can_
> confirm this bug on Linux, so I'll just change the OS setting to 'all'...
> 
> 
That's correct. I haven't found any configuration where it compiles 
under Windows -- and I tried pretty hard to get around this one... for 
example, slicing the arrays does not help. Even this (arguably simpler) 
variation doesn't work:

bool a()
{
     return "x"!="y";
}

void main()
{
     static assert( a() );
}


More information about the Digitalmars-d-bugs mailing list