std.algorithm.cmp is conflicting with itself.

realhet real_het at hotmail.com
Thu Aug 11 18:32:54 UTC 2022


On Thursday, 11 August 2022 at 18:10:31 UTC, Paul Backus wrote:
> ... If you remove `std.algorithm` from `testcmpmodule2`'s 
> `public import` line, the code compiles successfully.

Yes, but in the 40 module project I'm unable to make it work.
I doublechecked that the only public import of std.algorithm is 
in that utility module which is making the overload set.
If a third party module uses std.algorithm, it's not public, and 
I also restrict the import for specific names that it uses.
And still I'm not able to cmp("a", "b"), because of the conflict.

What I'm thinking of maybe it is some module in the std library 
that can make a second conflicting overload set? (I public import 
some std modules, and if there is a public import inside that 
module to std.algorithm it can happen. I guess it's a 
possibility.)




More information about the Digitalmars-d-learn mailing list