Add note to Unqualified about is(immutable T == immutable U). #9091
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In many cases, even when using Unqualified makes sense (as opposed to Unconst or Unshared), using is(immutable T == immutable U) works just as well and avoids instantiating any additional templates. This seems to becoming more known in the D community over time, but it seems appropriate to mention it in Unqualified's documentation so that more people will be made aware.
Also, I changed it so that Unqualified is always a wrapper template instead of directly being an alias of Unqual in core.internal.traits. This is because the names don't match, and the alias will show up in any error messages. Long term, we would ideally rename the symbol in core.internal (potentially turning the std.traits versions into a wrapper templates instead of an alias). However, since the functionality is effectively the same, and the std.traits one is the one currently being used by code in general, it seems better to let the std.traits one be the alias for now. The same applies to a few traits which are implemented in core.internal.traits and imported in std.traits or phobos.sys.traits.