emil-e/rapidcheck

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

qqii opened this issue · 0 comments

qqii commented
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>(); }