Skip to content

std.variant: Minor fixes#4908

Merged
andralex merged 2 commits intodlang:masterfrom
ntrel:variant-constraints
Nov 23, 2016
Merged

std.variant: Minor fixes#4908
andralex merged 2 commits intodlang:masterfrom
ntrel:variant-constraints

Conversation

@ntrel
Copy link
Contributor

@ntrel ntrel commented Nov 17, 2016

See commits.

std/variant.d Outdated
*/

int opCmp(T)(T rhs)
if (allowed!T)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

BTW allowed already allows T to be VariantN.

Copy link
Member

Choose a reason for hiding this comment

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

may want to put this in a comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@andralex Now done.

@ntrel ntrel force-pushed the variant-constraints branch 2 times, most recently from 123d031 to fff1d03 Compare November 18, 2016 11:46
std/variant.d Outdated
*/

int opCmp(T)(T rhs)
if (allowed!T)
Copy link
Member

Choose a reason for hiding this comment

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

may want to put this in a comment

This avoids internal error messages in VariantN.this.
@ntrel ntrel force-pushed the variant-constraints branch from fff1d03 to e36fb0a Compare November 23, 2016 10:45
@andralex andralex merged commit 7556346 into dlang:master Nov 23, 2016
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