CTFE toUpper/toLower

cal callumenator at gmail.com
Thu Aug 30 10:38:44 PDT 2012


On Thursday, 30 August 2012 at 06:30:50 UTC, Jacob Carlborg wrote:
> On 2012-08-30 08:28, Jacob Carlborg wrote:
>
>> It works for me. DMD 2.060 Mac OS X.
>
> Oh, it does not. If I replace:
>
> enum string[] fields = [EnumMembers!E].to!(string[]);
>
> With:
>
> enum string[] fields = ["one", "two"];
>
> It works.

Yeah its weird because:

enum string[] literalFields = ["one", "two"];
enum string[] enumFields = [EnumMembers!E].to!(string[]);

pragma(msg, literalFields[0] == enumFields[0]);

prints true, but toUpper works on the first and not the second


More information about the Digitalmars-d-learn mailing list