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

Should coroutine_handle<P1> == coroutine_handle<P2> be allowed? #25

Open
lewissbaker opened this issue Dec 9, 2017 · 0 comments
Open

Comments

@lewissbaker
Copy link

Currently the comparison operators for coroutine_handle<T> are defined for coroutine_handle<void>.

This means that it is valid to compare coroutine_handle<P1> with coroutine_handle<P2> as both are implicitly cast to coroutine_handle<void> and then compared. However, two coroutine handles with different promise types can never be equal.

Should the equality operator overloads for comparing two coroutine_handle values of different non-void promise types be declared deleted? Or possibly even declared constexpr and always return false?

GorNishanov added a commit that referenced this issue Feb 26, 2019
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

No branches or pull requests

1 participant