Skip to content

Conversation

@Superstar64
Copy link
Contributor

No description provided.


static if (hasAssignableElements!(ElementType!RoR))
{
@property void front(ElementType!(ElementType!RoR) element)
Copy link
Contributor

Choose a reason for hiding this comment

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

auto ref perhaps?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't auto ref args need to be templated? It didn't compile when I tried it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, they do.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe an overload in hasLvalueElements with a ref parameter would be appropriate?

@Superstar64
Copy link
Contributor Author

I added a ref overload

@Superstar64
Copy link
Contributor Author

I improved the unittest

@andralex
Copy link
Member

I think just making front return auto ref should work, no?

@Superstar64
Copy link
Contributor Author

This PR is for the case that the sub range has hasAssignableElements but does not have hasLvalueElements.

@JackStouffer
Copy link
Contributor

Auto-merge toggled on

@JackStouffer
Copy link
Contributor

@Superstar64 If reviewers go this long without commenting, please ping us!

Sometimes things fall through the cracks.

@JackStouffer JackStouffer merged commit fc37e0f into dlang:master Jan 18, 2017
@Superstar64 Superstar64 deleted the joiner_assign_front branch January 19, 2017 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants