[Issue 4423] [CTFE] TDPL enums of struct types

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 29 01:44:04 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=4423


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |6221


--- Comment #4 from Don <clugdbug at yahoo.com.au> 2011-06-29 01:38:57 PDT ---
This works in git master, if opCmp has signature
int opCmp(S rhs)            instead of 
int opCmp(const ref S rhs).

The problem lies in enum.c, which tries to determine max and min for the enum
by comparing the each element in the enum. Since they are struct literals, they
aren't lvalues, so 'const ref' fails.
This is an example of bug 6221.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list