The Fusion adapters have been giving me trouble for a long time now.
The problem is that Hana's unit tests are more thorough than Fusion's,
and hence we keep uncovering Fusion bugs through Hana's unit tests.
This keeps on breaking the build and makes me lose valuable time trying
to workaround these bugs until they are fixed in Fusion's master branch.
Therefore, only the methods that are implemented by Fusion adapters are
tested to make sure they work as expected, but the other algorithms that
are derived from them are not tested on Fusion adapters.
Of the xxx_exactly variants, only drop_front_exactly is kept for now,
because it actually allows an optimization. The other ones did not
really provide a compile-time improvement, so they are removed.
libc++'s std::pair always has a default constructor, and it is ill-formed
when the members are not default constructible. We need it to be SFINAE
friendly. See https://llvm.org/bugs/show_bug.cgi?id=21917.
This (large) commit introduces the following changes:
- Each algorithm lives in its own header
- The concepts are defined in the concept/ subdirectory. They define the
`models` metafunction, some explicit default implementations (like
Applicative::transform_impl), and they include all the algorithms
related to that concept.
- Removed the `until` method from Logical
- Removed the `drop_until` method from Iterable
- [minor] Added the detail::nested_to utility
Closes#160
- Replace init by drop_back and drop_back_exactly
- Rename head to front
- Rename last to back, and also rewrite the default implementation
in terms of at instead of using (inefficient) recursion.
- Rename drop[_exactly] to drop_front[_exactly]
- Remove drop_c
Note that tail is kept for the moment because it is part of Iterable's
MCD. Removing tail will be the subject of a different issue.
Fixes#66
Also:
- Remove the boost_hana_add_executable function, which is now useless
- Properly set the LD_LIBRARY_PATH to link against a custom libc++
- Adjust the Travis build
Fixes#135
Properly providing operators for users was too complicated, and it is
judged as being out of Hana's scope.
Instead, operators are now provided by helper classes in the detail::
namespace. Now, we can be as dirty as we want, since it is not part of
the interface anymore.
Fixes#138Closes#30