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

Fails to build with MSVC v141 /std:c++17 due to C2446 #298

Open
qqii opened this issue Oct 17, 2022 · 0 comments · May be fixed by #299
Open

Fails to build with MSVC v141 /std:c++17 due to C2446 #298

qqii opened this issue Oct 17, 2022 · 0 comments · May be fixed by #299

Comments

@qqii
Copy link

qqii commented Oct 17, 2022

rapidcheck\shrink\shrink.hpp(182): error C2446: ':': no conversion from 'rc::Seq<bool>' to 'rc::Seq<int>'
rapidcheck\shrink\shrink.hpp(182): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

https://github.com/emil-e/rapidcheck/blob/master/include/rapidcheck/shrink/Shrink.hpp#L186

Seq<bool> boolean(bool value) { return value ? seq::just(false) : Seq<bool>(); }

This seems to be a compiler issue, but can be easily resolved by being explicit with the template argument

Seq<bool> boolean(bool value) { return value ? seq::just<bool>(false) : Seq<bool>(); }
qqii added a commit to qqii/rapidcheck that referenced this issue Oct 17, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
MSVC complains with:
> shrink.hpp(182): error C2446: ':': no conversion from 'rc::Seq<bool>' to 'rc::Seq<int>'
This is remedied by being explicit with the template argument.

Fixes emil-e#298
@qqii qqii linked a pull request Oct 17, 2022 that will close this issue
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 a pull request may close this issue.

1 participant