Skip to content

Conversation

Biotronic
Copy link
Contributor

No description provided.

@@ -121,7 +121,7 @@ private
template isNullToStr(S, T)
{
enum isNullToStr = isImplicitlyConvertible!(S, T) &&
is(S == typeof(null)) && isExactSomeString!T;
(is(S == typeof(null)) || is(S == const(typeof(null))) || is(S == immutable(typeof(null)))) && isExactSomeString!T;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not is(Unqual!S == typeof(null)) ? It also has the added advantage of also implicitly handling shared(typeof(null)) and const(shared(typeof(null))) (which were forgotten here)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is indeed a very good point. Stay put, I'll be right back.

@monarchdodra
Copy link
Collaborator

LGTM. Will leave open or day or two, then merge.

monarchdodra added a commit that referenced this pull request Nov 1, 2013
@monarchdodra monarchdodra merged commit 9741b28 into dlang:master Nov 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants