https://issues.dlang.org/show_bug.cgi?id=21109
--- Comment #4 from Andrej Mitrovic <[email protected]> --- (In reply to Andrej Mitrovic from comment #3) > I think this is related to `sort`. It's possible that sort compares by > pointers if two structs are otherwise equivalent. > > And then using `enum` has a different effect on arrays, possibly optimizing > and storing the same pointer in two structs (making them equal). Sorry the actual reasoning should be: `enum` always allocates a new array, therefore the pointer addresses change each time. It's possible opCmp does a value comparison first, and then a pointer comparison. But I don't think pointers should be compared at all.. at least not when dealing with arrays and not naked pointers in a struct. --
