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

Use a lightweight bind implementation when no placeholders are given #2116

Merged
merged 4 commits into from
Apr 30, 2016

Conversation

K-ballo
Copy link
Member

@K-ballo K-ballo commented Apr 24, 2016

No description provided.

@hkaiser hkaiser added this to the 0.9.12 milestone Apr 24, 2016
@hkaiser
Copy link
Member

hkaiser commented Apr 24, 2016

Great idea! LGTM, thanks.

@@ -84,27 +82,27 @@ namespace hpx { namespace util
static HPX_FORCEINLINE
type call(T& t, Us&& /*unbound*/)
{
return std::move(t);
return std::forward<T>(t);
Copy link
Contributor

Choose a reason for hiding this comment

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

Agustin, why is std::forward used here (when t is not forwarding reference)?

Copy link
Member Author

Choose a reason for hiding this comment

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

T is a forwarding reference in this context, it will be an lvalue-reference when the bound argument is a reference_wrapper.

@hkaiser hkaiser merged commit 38dcdab into master Apr 30, 2016
@hkaiser hkaiser deleted the bind-simple branch April 30, 2016 11:36
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.

3 participants