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

Touching up make_future #1940

Merged
merged 5 commits into from Jan 9, 2016
Merged

Touching up make_future #1940

merged 5 commits into from Jan 9, 2016

Conversation

hkaiser
Copy link
Member

@hkaiser hkaiser commented Jan 2, 2016

  • add overloads for shared_future
  • make sure make_future<T>(future<T>) does not create ambiguities
  • import make_future into namespace hpx
  • adding test
  • flyby change: import make_future_void into namespace hpx

- add overloads for shared_future
- make sure make_continuation(future<T>(future<T>) does not create ambiguities
- import make_future into namespace hpx
- adding test
- flyby change: import make_future_void into namespace hpx
// conversion function: T f(U).
template <typename R, typename U, typename Conv,
HPX_CONCEPT_REQUIRES_(
hpx::traits::is_callable<Conv(U)>::value)>
Copy link
Member

Choose a reason for hiding this comment

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

Should we check if the result of Conv(U) is convertible to R?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can do that, I was afraid of over-constraining requirements.

@hkaiser
Copy link
Member Author

hkaiser commented Jan 7, 2016

@sithhell Your comments have been addressed.

};

template <>
struct make_future_helper<void, void>
Copy link
Member

Choose a reason for hiding this comment

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

Isn't the template specialization on line 951 enough?

Copy link
Member

Choose a reason for hiding this comment

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

No, <void, void> is ambiguous between <void, T> and <T, T>

@sithhell
Copy link
Member

sithhell commented Jan 8, 2016

LGTM!

hkaiser added a commit that referenced this pull request Jan 9, 2016
@hkaiser hkaiser merged commit 1b4fbdd into master Jan 9, 2016
@hkaiser hkaiser deleted the fixing_make_future branch January 9, 2016 22:00
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.

None yet

3 participants