std.algorithm.cmp is conflicting with itself.

bachmeier no at spam.net
Fri Aug 12 02:13:48 UTC 2022


On Thursday, 11 August 2022 at 22:34:11 UTC, realhet wrote:
> On Thursday, 11 August 2022 at 19:33:31 UTC, bachmeier wrote:
>> std.string does a public import of std.algorithm.cmp.
>
> That was it! Thanks!
>
> Conclusion: This is how to overload cmp()

A search of the forum suggests [this is how I learned about 
it](https://forum.dlang.org/post/mailman.1843.1415813238.9932.digitalmars-d@puremagic.com). I most likely had the same problem early in my D career. I don't know if anything further was ever done to fix the problem (if anything could be done), but if this is a design mistake that can't be fixed, there should at least be an informative error message so we know where to look. The error message you posted already identifies it as std.algorithm.comparison.cmp.


More information about the Digitalmars-d-learn mailing list