-
-
Notifications
You must be signed in to change notification settings - Fork 740
[REG2.065a] Issue 12089 - std.utf.validate and inout(char[]) failts to compile #1921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
What about bug https://d.puremagic.com/issues/show_bug.cgi?id=1308 ? It would be nice to be able to have the initially suggested: static if (is(T U == const U)) alias Unqual!U Unqual;
else static if (is(T U == immutable U)) alias Unqual!U Unqual;
else static if (is(T U == inout U)) alias Unqual!U Unqual;
else static if (is(T U == shared U)) alias Unqual!U Unqual;
else alias T Unqual; Other than that, LGTM |
Sorry, I'm not sure that bug 1308 is really fixed. And, I think this change is better because it is low risk for the regression fix. |
Yeah, I was just pointing out I think it's a shame to have to resort to making the full enumeration for this. Related, doesn't
Yup, no problem on my end. I'll merge once |
Good catch. I also fixed |
Auto-merge toggled on |
Thanks! |
else static if (is(T U == shared(inout const U))) alias Unqual = U; | ||
else static if (is(T U == shared(inout U))) alias Unqual = U; | ||
else static if (is(T U == shared( const U))) alias Unqual = U; | ||
else static if (is(T U == shared( U))) alias Unqual = U; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style question: Would static if (is(T U == shared inout const U))
work, or are those parens necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of cause shared inout const U
will work. Less parenthesis is better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Less parenthesis is better?
I guess, it looked like a weird "hybrid" style to me, so I was wondering if there was a reason for it. If there is no reason, I'd think it's better to use shared inout const U
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, updated.
Unqual should support inout(const(T))
Pull updated, auto_merge toggled off |
Auto-merge toggled on |
[REG2.065a] Issue 12089 - std.utf.validate and inout(char[]) failts to compile
Thanks again! |
[REG2.065a] Issue 12089 - std.utf.validate and inout(char[]) failts to compile
Hum... There's also the list of |
https://d.puremagic.com/issues/show_bug.cgi?id=12089
Unqual should support inout(const(T))