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

Copy variant cvref when determining result type #68

Merged
merged 3 commits into from Apr 23, 2019

Conversation

@ecatmur
Copy link
Contributor

commented Apr 17, 2019

Ensures that we can e.g. call apply_visitor on a lvalue variant

e.g. works up to 1.69, broken in 1.70 (broken by #55)

#include <boost/variant.hpp>
int main() {
    boost::variant<int, long> v;
    boost::apply_visitor([](auto& i) {}, v);
}
Edward Catmur
Copy variant cvref when determining result type
Ensures that we can e.g. call apply_visitor on a lvalue variant
@coveralls

This comment has been minimized.

Copy link

commented Apr 17, 2019

Coverage Status

Coverage remained the same at 95.297% when pulling 7331d64 on ecatmur:apply-visitor-copy-cv-ref into 5be655d on boostorg:develop.

@apolukhin

This comment has been minimized.

Copy link
Member

commented Apr 17, 2019

Please also add a testcase

ecatmur added 2 commits Apr 20, 2019
@ecatmur

This comment has been minimized.

Copy link
Contributor Author

commented Apr 20, 2019

Added a test. Wasn't quite sure how to write it but this is closest to my motivating use case.

@Kojoley Kojoley referenced this pull request Apr 22, 2019

@apolukhin apolukhin merged commit 31ed2a3 into boostorg:develop Apr 23, 2019

4 checks passed

Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 95.297%
Details
@apolukhin

This comment has been minimized.

Copy link
Member

commented Apr 23, 2019

Many thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.