Skip to content
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

runInEpoch* do not take a universal reference (they take a r-val ref) #1125

Closed
lifflander opened this issue Oct 23, 2020 · 2 comments · Fixed by #1133
Closed

runInEpoch* do not take a universal reference (they take a r-val ref) #1125

lifflander opened this issue Oct 23, 2020 · 2 comments · Fixed by #1133
Assignees

Comments

@lifflander
Copy link
Collaborator

What Needs to be Done?

Due to this, you can pass an existing std::function to them. Template them and move to the header file. Something like this would work:

template <typename Callable>
void runInEpochCollective(Callable&& fn) {
  //...
}
@lifflander
Copy link
Collaborator Author

Also, write tests for these to avoid problems like this coming up

cz4rs added a commit that referenced this issue Oct 30, 2020
Make sure that vt::runInEpoch* accepts std::function as an argument.
cz4rs added a commit that referenced this issue Oct 30, 2020
Make sure that vt::runInEpoch* accepts std::function as an argument.
@cz4rs
Copy link
Contributor

cz4rs commented Oct 30, 2020

Due to this, you can pass an existing std::function to them. Template them and move to the header file. Something like this would work:

Changes implemented, typo in the description? (it was not possible to pass std::function before and it is possible now, after templating the functions)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants