2
0
mirror of https://github.com/boostorg/hana.git synced 2026-02-01 08:32:11 +00:00

[Traversable] Remove that concept entirely

That concept was added more for completeness than for actual usefulness,
since I have not used it a single time since its creation. Given the
complexity of the library, I think it is better to remove it and shrink
the library to a more useful core than giving too many features that
contribute to bloat.

Also, the laws were difficult to check and it hence Traversable models
were not very well tested anyway.

I can always roll this back if someone shows me how Traversable is
actually useful for metaprogramming.
This commit is contained in:
Louis Dionne
2015-06-10 10:07:55 -04:00
parent 3ea05a0f00
commit 9928dea216
29 changed files with 11 additions and 874 deletions

View File

@@ -86,26 +86,6 @@ BOOST_HANA_CONSTANT_CHECK(empty<Optional>() == nothing);
}{
//! [traversable]
BOOST_HANA_CONSTEXPR_LAMBDA auto replicate3 = [](auto x) {
return make<Tuple>(x, x, x);
};
BOOST_HANA_CONSTEXPR_CHECK(
traverse<Tuple>(just(1), replicate3)
==
make<Tuple>(just(1), just(1), just(1))
);
BOOST_HANA_CONSTANT_CHECK(
traverse<Tuple>(nothing, replicate3)
==
make<Tuple>(nothing)
);
//! [traversable]
}{
//! [foldable]
BOOST_HANA_CONSTEXPR_LAMBDA auto plus = [](auto x, auto y) {
return x + y;