We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This doesn't compile
#include <boost/hana.hpp> #include <boost/hana/ext/std/tuple.hpp> #include <boost/optional.hpp> bool f() { auto t = std::make_tuple(boost::optional<int>{boost::none}, boost::optional<int>{4}); return boost::hana::all(t); }
This does, but not under MSVC (it rightfully complains that the lambda passed to all_of needs to return a Logical.
all_of
Logical
#include <boost/hana.hpp> #include <boost/hana/ext/std/tuple.hpp> #include <boost/optional.hpp> bool f() { auto t = std::make_tuple(boost::optional<int>{boost::none}, boost::optional<int>{4}); return boost::hana::all_of(t, [](auto v) { return static_cast<bool>(v); }); }
This compiles everywhere, but is suboptimal due to lack of early return:
#include <boost/hana.hpp> #include <boost/hana/ext/std/tuple.hpp> #include <boost/optional.hpp> bool f() { auto t = std::make_tuple(boost::optional<int>{boost::none}, boost::optional<int>{4}); return boost::hana::fold(t, true, [](bool state, auto v) { return state && static_cast<bool>(v); }); }
Reading through the documentation, I couldn't find any information about runtime support of algorithms. Is this a bug or an expected limitation?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This doesn't compile
This does, but not under MSVC (it rightfully complains that the lambda passed to
all_of
needs to return aLogical
.This compiles everywhere, but is suboptimal due to lack of early return:
Reading through the documentation, I couldn't find any information about runtime support of algorithms. Is this a bug or an expected limitation?
The text was updated successfully, but these errors were encountered: