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

Fix get<T>(variant) when variant is a rvalue #406

Merged
merged 1 commit into from
Dec 4, 2020

Conversation

lhamot
Copy link
Contributor

@lhamot lhamot commented Dec 3, 2020

Hello!
The function eastl::get<T>(variant&&) can't work because the get<I>(v) take a lvalue (v has a name so it is a lvalue) and so return a lvalue, which can't be implicitly converted to rvalue.
eastl::move is used to force v to be a rvalue.

@rparolin
Copy link
Contributor

rparolin commented Dec 4, 2020

Looks good to me. Thanks for the patch!

@rparolin rparolin merged commit 07aecde into electronicarts:master Dec 4, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants