Commit Graph

1208 Commits

Author SHA1 Message Date
Louis Dionne
131c56c32a Add the take_back algorithm 2016-01-12 10:00:11 -05:00
Louis Dionne
d60646237d [core] Rename core/convert.hpp to core/to.hpp 2016-01-10 18:32:57 -05:00
Louis Dionne
ed308613a8 [doc] Fix issue with undocumented boost::hana namespace 2016-01-09 14:16:55 -08:00
Louis Dionne
72adb9ee51 [Doc] Fix minor nitpick with for_each's documented definition 2016-01-06 15:30:37 -05:00
Louis Dionne
7e04b36268 Add BOOST_HANA_ENABLE_DEBUG_MODE and optional checks in make_set and make_map
Closes #230
2016-01-06 09:25:41 -05:00
Louis Dionne
5e62da18a1 [string] Modularize the unit tests
Also workaround a missing #include in string.hpp
2016-01-04 10:34:18 -05:00
Louis Dionne
c41a5cb6be Update copyright notices for 2016 2016-01-01 14:54:06 -05:00
Jason Rice
b7ee8d750d [bug] predicate to bool in find_if default impl
Related #221
 - decay result of predicate
2015-12-22 11:01:19 -05:00
Louis Dionne
1d57e8669e [std::tuple] Add a test to make sure we workaround libc++ bug 22806 2015-12-21 21:21:37 -05:00
Louis Dionne
af881d3fa2 [Assert] Add xxx_MSG versions of the assertion macros
Fixes #216
2015-12-18 15:04:20 -05:00
Louis Dionne
a723f28650 [detail] Support __VA_ARGS__ in PP_STRINGIZE 2015-12-18 14:17:26 -05:00
Louis Dionne
b55260b3f4 [if_] Fix lifetime issue introduced in d93a7c8 2015-12-17 08:40:22 -05:00
Louis Dionne
d93a7c81c3 [if_] Hold branches by reference instead of moving them in 2015-12-16 14:06:55 -05:00
Louis Dionne
401204d238 [experimental] Remove unused experiment with fold expressions 2015-12-16 14:06:55 -05:00
Jason Rice
35449972d3 [bug] convert predicate results to bool
[ldionne: Minor reformatting (add spaces after //)]

Fixes #221
Closes #222
2015-12-16 11:55:24 -05:00
Louis Dionne
95c8d6ab50 [find_if] Support predicates that return an int.
Fixes #221
2015-12-11 15:57:51 -05:00
Louis Dionne
afe7c52e55 [Printable] Remove misleading constexpr in the documentation 2015-12-11 11:49:04 -05:00
Jason Rice
5c1254f404 [experimental] print_impl for optional
- also added explicit return type for all `print_impl`s
2015-12-10 15:15:23 -08:00
Louis Dionne
850dbf7ad7 Provide an experimental print function
Closes #200
Closes #219
2015-12-09 14:47:13 -05:00
Louis Dionne
75cdd4d4d1 [Doc] Allow breaking MathJax equations on multiple lines
This should fix some issues when looking at the documentation
on small devices.

Also, fix mis-rendered `monadic_compose` in math mode.

Closes #156
2015-12-04 15:19:24 -05:00
Louis Dionne
6bff9f2fc0 [map/set] Document and test the copy/move constructors
Fixes #217
2015-12-04 11:04:04 -05:00
Louis Dionne
baec3a721c Use qualified names for concepts, for consistency 2015-11-29 12:11:54 -05:00
Louis Dionne
fef6023530 [optional] Reword the documentation for constructors and assignments
Fixes #190
2015-11-26 18:00:02 -05:00
Louis Dionne
3316aed8a8 [Config] Adjust warning messages when detecting compilers 2015-11-25 12:29:54 -05:00
Louis Dionne
f41abafb13 [tag_of] Require idempotence
Also, fix Doxygen warning in core/convert.hpp.

Closes #212
2015-11-21 15:19:40 -05:00
badair
87f82e9003 [feature] [UDL] adding UDL logic for hex, binary, octal
[ldionne:
Remove rogue whitespace at the end of lines

Closes #210]
2015-11-20 08:52:55 -05:00
Louis Dionne
8bf53a367e Bump version to 0.7.0 2015-11-19 14:41:03 -05:00
Louis Dionne
e213a0b283 [to] Define to_t in the forward header 2015-11-17 16:27:48 -05:00
Louis Dionne
7103b41775 [to_xxx] Move to fwd headers 2015-11-17 09:41:07 -05:00
Louis Dionne
56d4c499ad Use a macro to open and close Hana's namespace
Note, however, that we're not using inline namespaces yet.
Using a macro to open/close the namespace would however make
such a change trivial.
2015-11-17 09:33:21 -05:00
badair
197c152495 [to_xxx] [convert] adding to<xxx> equivalents
- adding to_map
- adding to_set
- adding to_tuple

ldionne:
    Closes #206
    Closes #164
2015-11-16 20:18:08 -05:00
Louis Dionne
a41f63693b [Tutorial] Complete the section on external adapters 2015-11-15 15:16:31 -05:00
Louis Dionne
2a0bf6b34f [std::ratio] Add documentation 2015-11-15 15:16:31 -05:00
Louis Dionne
b906aeb277 [std::pair] Add documentation 2015-11-15 15:16:31 -05:00
Louis Dionne
d54fb5fa32 [boost::tuple] Add documentation 2015-11-15 15:16:31 -05:00
Louis Dionne
735fc4e628 [std::tuple] Add documentation 2015-11-15 15:16:31 -05:00
Louis Dionne
371c07e62d [std::integral_constant] Add documentation 2015-11-15 15:16:31 -05:00
Louis Dionne
11a7300651 [Fusion] Document adapters 2015-11-15 15:16:31 -05:00
Louis Dionne
f307d74daa [mpl::list] Refactor the reference documentation 2015-11-15 15:16:31 -05:00
Louis Dionne
771f822458 [Doc] Minor stylistic improvements 2015-11-15 15:16:31 -05:00
Louis Dionne
e93de9580c [mpl::integral_c] Refactor the documentation 2015-11-15 15:16:31 -05:00
Louis Dionne
b86580c593 [mpl::vector] Refactor the reference documentation 2015-11-15 15:16:31 -05:00
Louis Dionne
184bdad14a [std::integer_sequence] Document and add examples 2015-11-15 15:16:30 -05:00
Louis Dionne
11096eb1d0 [std::array] Document properly and add examples 2015-11-15 15:16:30 -05:00
Louis Dionne
61b3ab74dc [Doc] Prepare the setup to document external adapters. 2015-11-15 15:16:30 -05:00
m-j-w
87c036bc64 [Clang-cl] Compiler detection for LLVM/Clang-cl with Visual Studio integration
[ldionne: Minor reindentation, add space between < operator]

Closes #203
2015-11-15 15:15:12 -05:00
Louis Dionne
5a461a40ac [adjust_if] Minor improvement in the implementation 2015-11-14 10:37:56 -05:00
Louis Dionne
8ff5987200 [equal] Minor improvement in struct comparison 2015-11-14 10:28:40 -05:00
Louis Dionne
b5e82061d8 Provide macros to detect the version of the library
Closes #189
2015-11-13 14:25:33 -05:00
Louis Dionne
537e4fe645 [Detail] Avoid EBO-disabling duplicate base classes caused by operators::adl
Fixes #202
2015-11-13 12:23:06 -05:00
Louis Dionne
e77801512e [Doc] Fix the name of BOOST_MPL_MAX_XXX_SIZE, and add links 2015-11-12 14:33:54 -05:00
Louis Dionne
e13d826496 [MPL] Add support for mpl::list 2015-11-12 14:23:15 -05:00
Louis Dionne
cb390d2c82 [Detail] Use qualified calls in detail/algorithm.hpp 2015-11-11 16:38:10 -05:00
Louis Dionne
3707877225 [Iterable] Remove the tail function
Closes #158
2015-11-11 14:08:36 -05:00
Louis Dionne
7d578de9d8 [Iterable] Reformulate the MCD in terms of drop_front 2015-11-07 16:18:11 -05:00
Louis Dionne
0fb43a90ed [Fusion] Fix bug in tail(fusion::deque) 2015-11-07 12:06:02 -05:00
Louis Dionne
2e0df33d8e [Iterable] Optimize the default implementation of drop_front_exactly 2015-11-06 13:04:23 -05:00
Louis Dionne
f1090d517f [Map] Take by const& instead of by value in any_of 2015-11-03 10:57:33 -05:00
Louis Dionne
cb411673d2 [Struct doc] Fix misformatting of refined concepts 2015-10-27 10:30:16 -04:00
Louis Dionne
58df94c84c [Doc] Add a link to eval_if from the documentation of eval.
Fixes #146
2015-10-27 08:52:56 -04:00
Louis Dionne
b0f8cf2bf1 [Doc] Add links to functional programming concepts
Closes #134
2015-10-22 17:59:03 -04:00
Louis Dionne
dbd0fb9246 Change links from ldionne/hana to boostorg/hana 2015-10-19 09:41:47 -04:00
Louis Dionne
8a643a9c14 [optional] Make the interface closer to that of std::optional
Also remove `only_when`, which is frankly not very useful.
2015-10-12 11:29:37 -04:00
Louis Dionne
6ce5826b75 [Struct] Return a reference from at_key
Partially addresses #90
2015-10-12 10:45:49 -04:00
Louis Dionne
35da925d19 [IntegralDomain] Rename to EuclideanRing
Note that no `norm` function is added for now, since the `norm` is not
tied to the specific Euclidean ring as explained in [1]. However, it
might be useful to enforce an arbitrary choice to be made for each
Euclidean ring. This could perhaps be added in the future.

Fixes #28

[1]: https://en.wikipedia.org/wiki/Euclidean_domain#Definition
2015-10-08 14:42:22 -04:00
Louis Dionne
bd974d6ad8 [capture] Clarify the documentation, and explain difference with partial
Fixes #183
2015-10-03 20:25:10 -04:00
Louis Dionne
c15822e93b [filter] Use unpack in the implementation for Sequences 2015-10-03 20:25:10 -04:00
Louis Dionne
d6acfe4164 Add detail::decay, a faster equivalent to std::decay 2015-09-30 15:40:41 -04:00
Louis Dionne
42934900b8 [Struct] Add the BOOST_HANA_ADAPT_ADT macro
Also
- Reorganize adaptation macro unit tests
- Add BOOST_HANA_PP_DROP_FRONT and BOOST_HANA_PP_FRONT macros
2015-09-22 13:37:49 -07:00
Louis Dionne
df7bdf5c69 [functional/apply] Behave like C++17's std::invoke 2015-09-22 10:40:23 -07:00
Louis Dionne
989d5f3f0a [map] Return a reference from at_key
Addresses this StackOverflow question: http://stackoverflow.com/q/32702383/627587
And also partially addresses #90.
2015-09-22 10:40:23 -07:00
Louis Dionne
403afe2dc9 [folds] Fix bugs in folds when taking state by reference
Partially addresses this SO question: http://stackoverflow.com/q/32702383/627587
2015-09-22 10:40:23 -07:00
Louis Dionne
5dd8a4c645 [Struct] Improve documentation about alternate interface for accessors
Addresses http://stackoverflow.com/q/32678647/627587
2015-09-21 23:54:22 -07:00
Louis Dionne
cf063a4fe3 Return hana::integral_constants from type_traits adapters
Also, remove the ext/std/{type_traits,utility} headers in favour of the
<boost/hana/traits.hpp> header.
2015-09-21 07:45:04 -07:00
Louis Dionne
01085771f2 [Doc] Minor fixes in Sequence and MonadPlus
- MonadPlus: "Second" -> "Secondly"
- Sequence: Fix malformatted list of provided models
2015-09-20 09:24:19 -07:00
Louis Dionne
54a03c1998 [Doc] Fix broken links to insert, erase_key and keys 2015-09-15 10:30:03 -04:00
Louis Dionne
6777caade1 [map] Optimize the insert method, which had bad runtime performance 2015-09-15 10:04:06 -04:00
Louis Dionne
41c64b39a9 [IntegralDomain] Rename quot/rem to div/mod
Fixes #180
2015-09-14 14:18:29 -04:00
Louis Dionne
41c621ba0f [Config] Define BOOST_HANA_CONFIG_LIBSTDCXX when the stdlib is libstdc++ 2015-09-13 16:10:05 -04:00
Louis Dionne
cb2badbc88 [detail/by] Rename detail::by to detail::nested_by for consistency 2015-09-13 10:52:08 -04:00
Louis Dionne
3fdfc475a1 [detail] Remove now unused generate_integer_sequence 2015-09-13 10:52:08 -04:00
Louis Dionne
267cef77e1 [Doc] Remove Doxygen warnings and make it more quiet 2015-09-12 23:54:37 -04:00
Louis Dionne
1d7b720c95 [Enumerable] Remove that concept entirely.
Enumerable was not being used inside the library, and its usefulness
was questionable due to the lack of upper/lower bounds.

Closes #23
2015-09-12 17:59:58 -04:00
Louis Dionne
272e583ce5 [tuple] Optimize find_if and do minor refactoring 2015-09-12 15:07:52 -04:00
Louis Dionne
ca2d5a69c5 [Config] Remove xxx_CONSTEXPR_MEMBER_FUNCTION_IS_CONST macro
This macro was only relevant on GCC 4.9, but we're not supporting
it anyway.
2015-09-11 12:40:14 -04:00
Louis Dionne
f74cfba590 [functional/partial] Workaround bug in libstdc++ tuple 2015-09-11 12:40:14 -04:00
Louis Dionne
8e80aff466 [detail] Remove now obsolete variadic::for_each 2015-09-09 19:58:40 -04:00
Louis Dionne
049f8e1dd7 [unpack] Show the right benchmark in the docs (was showing transform's)
Also, sample every 2 increments, otherwise the graph is undreadable
2015-09-09 19:33:19 -04:00
Louis Dionne
eeb856a243 [detail/operators] Move the hana::operators to detail
Makes it clear that this is an implementation detail only. Also, slightly
improve the documentation of operators::adl.

Fixes #178
2015-09-09 18:32:32 -04:00
Louis Dionne
c32ec8c3d0 Reformulate many algorithms in terms of IntegralConstants instead of Constants 2015-09-09 15:55:18 -04:00
Louis Dionne
136ba9be56 [IntegralConstant] Add the repeat algorithm
Fixes #100
2015-09-09 15:37:31 -04:00
Louis Dionne
8b1b9ce0e6 Add the IntegralConstant concept
Also, make existing Constants models of IntegralConstant. This fixes #132
by making the definition of a model of Constant reasonably easy for
IntegralConstants.
2015-09-09 15:36:53 -04:00
Louis Dionne
da0a8281d1 Replace decltype(xxx_c) patterns by their actual types 2015-09-09 15:26:19 -04:00
Louis Dionne
cb43a2f7b2 [Doc] Minor fixes
- Do not strip comments from the documentation
- Mention `to` in the MCD of Constant
2015-09-09 15:25:50 -04:00
Louis Dionne
a7f25d124e [slice] Accept an arbitrary Foldable of indices, and remove subsequence
Fixes #84
2015-09-08 17:29:54 -04:00
Louis Dionne
5d02750150 Improve diagnostics for supported compilers and standard libraries
Closes #172
Closes #168
2015-09-08 08:25:07 -04:00
Louis Dionne
423bc7220a [MonadPlus] Rename repeat to replicate 2015-09-07 22:43:35 -04:00
Louis Dionne
35c8d59074 Remove detail::closure, now replaced by basic_tuple 2015-09-07 16:32:14 -04:00
Louis Dionne
37dc041af5 [Functional][lazy] Use basic_tuple instead of closure<>
Also, modularize and refactor some unit tests for Functional utilities.
2015-09-07 16:31:23 -04:00
Louis Dionne
ef3d46e8aa [hana::pair] Document the constructors and add unit tests 2015-09-07 14:28:35 -04:00
Louis Dionne
c8ce4694d0 [Detail] Add the detail/intrinsics.hpp header to centralize the optimization 2015-09-07 13:08:11 -04:00
Louis Dionne
65b91ece69 [integral_constant] Inherit from std::integral_constant
Fixes #92
2015-09-06 12:43:47 -04:00
Louis Dionne
54885b9275 [map] Enclose the definition of hana::map in @cond to hide base classes from Doxygen 2015-09-05 22:54:03 -04:00
Louis Dionne
db48f3508e [Foldable] Add benchmarks for unpack and folds, and optimimze unpack for tuple 2015-09-05 22:54:03 -04:00
Louis Dionne
cf56c3ab83 [Doc] Document new-style concepts and remove core/models.hpp 2015-09-05 19:27:38 -04:00
Louis Dionne
fd5e3ca715 [Concepts] Define concepts as template structs instead of using models<>
The `models<>` machinery added unnecessary complexity for little benefit.
Also, this makes Hana's concepts syntactically closer to concepts lite,
which should contribute to making them easier to grasp at first sight.
2015-09-05 19:25:01 -04:00
Louis Dionne
98358c5f94 [integral_constant] Refactor the documentation 2015-09-05 17:12:44 -04:00
Louis Dionne
b9d0f6d2d1 [integral_constant] Rename IntegralConstant to integral_constant_tag 2015-09-03 13:29:17 -04:00
Louis Dionne
673a84c787 [ext/] Rename tags to xxx_tag for external adapters 2015-09-03 13:29:17 -04:00
Louis Dionne
19a2d9a1d6 [type] Rename Type to type_tag 2015-09-02 22:32:52 -04:00
Louis Dionne
de79e56a5f [string] Rename String to string_tag 2015-09-02 21:59:05 -04:00
Louis Dionne
79db7e90df [range] Rename Range to range_tag 2015-09-02 21:59:05 -04:00
Louis Dionne
a58ad3bdbc [basic_tuple] Rename BasicTuple to basic_tuple_tag 2015-09-02 21:59:05 -04:00
Louis Dionne
5cec8b3e2e [tuple] Rename Tuple to tuple_tag 2015-09-02 21:59:04 -04:00
Louis Dionne
cd133c3a24 [optional] Rename Optional to optional_tag 2015-09-02 21:59:04 -04:00
Louis Dionne
3a50767bd4 [pair] Rename Pair to pair_tag 2015-09-02 21:59:04 -04:00
Louis Dionne
b2adb373ee [set] Rename Set to set_tag 2015-09-02 21:59:04 -04:00
Louis Dionne
9168cc4ce8 [map] Rename Map to map_tag 2015-09-02 21:59:04 -04:00
Louis Dionne
2110ef724d [lazy] Rename Lazy to lazy_tag 2015-09-02 21:59:04 -04:00
Louis Dionne
c52c6d88d4 [Doc] Adjust the documentation to use "tag" instead of "data type" when it makes sense 2015-09-02 21:59:03 -04:00
Louis Dionne
44a0676604 [Struct] Use hana_accessors_impl instead of hana::accessors_impl
For consistency with hana_tag.
2015-09-02 21:59:03 -04:00
Louis Dionne
4e3d17bd3b [Core] Do not use a nested ::hana struct to hold the tag.
This was annoying because

(1) We couldn't use the name hana:: from within the struct
(2) It requires one more instantiation unless you use the
    `using hana = self` trick. But that trick makes something
    that should be trivial to do slightly harder, and that is stupid.
2015-09-02 21:59:03 -04:00
Louis Dionne
f3d9df96d0 [Core] Rename datatype<> to tag_of<>
Also, rename the nested hana::datatype alias to hana::tag.
2015-09-02 21:59:03 -04:00
Louis Dionne
224f7d5253 [boost/fusion.hpp] Remove obsolete check for Boost version 2015-09-02 21:59:02 -04:00
Louis Dionne
08f66d47c1 [IntegralConstant] Suffix variable templates with _c, and clean up type names
Along with PR #166, this closes #122 because names have now been
cleaned up and are now consistent basically everywhere.
2015-09-01 16:34:04 -04:00
Benjamin Roland Buch
05a57e562d [type] operators::adl is already base class of basic_type< T >
[ldionne: Closes #170]
2015-09-01 16:33:56 -04:00
Louis Dionne
6f2def29c0 [Tuple] Refactor and bullet-proof the implementation
- Use basic_tuple instead of closure<> for the inner storage
- Make sure the assignment operators are constexpr
- Copy the unit tests from closure<> (closure will eventually be removed anyway)

Fixes #165
2015-08-31 18:24:40 -04:00
Louis Dionne
a65db394c3 [String] Add make_string, for consistency 2015-08-31 17:28:44 -04:00
Louis Dionne
f4530d3058 Add a master header for the boost/hana/concept subdirectory 2015-08-31 17:27:40 -04:00
Louis Dionne
1754a6305a [Doc] Move the less function out of the group-concepts 2015-08-31 17:27:40 -04:00
Louis Dionne
0e8913fa3c [Doc] Use implementation-defined instead of unspecified-type
Also, update the tutorial to reflect the fact that container types
are now sometimes specified.
2015-08-31 13:42:15 -04:00
Louis Dionne
d8b08aa43c [Doc] Promote Metafunction from data type to concept, and document as such 2015-08-31 12:59:22 -04:00
Louis Dionne
98e76512a1 [Doc] Document hana::lazy instead of hana::Lazy 2015-08-31 11:42:57 -04:00
Louis Dionne
c2ed70ddf9 [Doc] Document hana::type instead of hana::Type
Precisely,
1. Rename hana::_type to hana::basic_type, and document it
2. Rename hana::type<> to hana::type_c<>
3. Create and document the hana::type<> type
2015-08-30 17:08:06 -04:00
Louis Dionne
e1d08aa277 [Doc] Document hana::basic_tuple instead of hana::BasicTuple 2015-08-30 17:07:19 -04:00
Louis Dionne
d0492da082 [Doc] Document hana::integral_constant instead of hana::IntegralConstant 2015-08-30 17:07:19 -04:00
Louis Dionne
ed2eca2ddb [Doc] Document hana::string instead of hana::String 2015-08-30 17:07:19 -04:00
Louis Dionne
3738a4c662 [Doc] Document hana::range instead of hana::Range 2015-08-30 17:07:18 -04:00
Louis Dionne
7f933490ad [Doc] Document hana::optional instead of hana::Optional 2015-08-30 17:07:18 -04:00
Louis Dionne
4bd3c6bd0e [Doc] Document hana::map instead of hana::Map 2015-08-30 17:07:18 -04:00
Louis Dionne
22d75503ed [Doc] Document hana::pair instead of hana::Pair 2015-08-30 17:07:18 -04:00
Louis Dionne
e4c1b44f8e [Doc] Document hana::set instead of hana::Set 2015-08-30 17:07:18 -04:00
Louis Dionne
6d80a308da [Doc] Document hana::tuple instead of hana::Tuple
Also, document the member functions of `hana::tuple` and add an example.

Fixes #163
2015-08-30 17:07:18 -04:00
Louis Dionne
980e97a3ef [Detail] Move stuff out of the constexpr/ subdirectory and namespace 2015-08-28 11:32:09 -04:00
Louis Dionne
5b530824fe [GCC] Workaround bugs and warnings
- Fix ambiguous overload of `concat` for Optionals
- Fix compilation error in std::vector unit test
- Fix false positives related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66543
- Fix compilation error caused by variable template initialized by a lambda
2015-08-28 10:21:04 -04:00
Louis Dionne
307f0d8c50 Add the lexicographical_compare algorithm 2015-08-26 13:40:11 -04:00
Louis Dionne
9fb555fc4a [zip_shortest_with] Use a constexpr min_element instead of minimum(tuple(...)) 2015-08-26 11:27:28 -04:00
Louis Dionne
f373b421f9 [Headers] Minimize the #includes in headers
- Allow specializing models_impl with a forward declaration only
- Modularize remaining concept headers
- Include <boost/hana.hpp> in unit tests to ease the transition
- Add the core/dispatch.hpp header to reduce the number of boilerplate includes
2015-08-26 11:27:28 -04:00
Louis Dionne
a62ab5cb29 [at_c] Use a function instead of a variable template, and optimize
Using a function instead of a variable template allows us to provide an
optimized version for hana::tuple more easily. It also fixes some issues
on GCC.
2015-08-26 11:27:27 -04:00
Louis Dionne
32627e2463 [Doc] Properly document the boost::hana::literals namespace 2015-08-25 17:51:39 -04:00
Louis Dionne
a02a62b652 [Sequence] Modularize some provided models 2015-08-24 21:37:11 -04:00
Louis Dionne
92edd1c98f [Orderable] Remove Orderable::equal_impl 2015-08-24 21:35:34 -04:00
Louis Dionne
40a687bbcc [Monad] Remove Monad::ap_impl
We still document the implementation of `ap` for Monads, but we do not
provide it.
2015-08-24 21:35:34 -04:00
Louis Dionne
13d1247acf [Iterable] Automatically provide the model of Searchable for infinite Iterables 2015-08-24 18:51:31 -04:00
Louis Dionne
b8fecf3cad [Applicative] Remove Applicative::transform_impl
The possibility to define transform(xs, f) = ap(lift(f), xs)
is still documented, but no implementation is provided by Hana.
2015-08-24 18:51:31 -04:00
Louis Dionne
6adefb627d [std::array] Use operators instead of Hana's implementations for equal and less 2015-08-24 18:51:31 -04:00
Louis Dionne
f25212ae0c Fix #includes of the wrong forward declaration header 2015-08-24 16:52:22 -04:00
Louis Dionne
99275d5cc3 Simplify specializations for Sequences, and use fast_and instead of hana::all 2015-08-24 16:52:22 -04:00
Louis Dionne
bf0670e814 [second] Remove useless #include 2015-08-24 13:47:07 -04:00
Louis Dionne
529f1cd459 [Either] Remove entirely
I had been unsatisfied with Either for a while now, thinking it might
be useless. I am now convinced that it is useless, and I hence remove
it from the library altogether.
2015-08-24 13:21:25 -04:00
Louis Dionne
b7d478fb39 [Concepts] Strip down some headers and reimplement models without _integral_constant 2015-08-24 13:21:25 -04:00
Louis Dionne
e2c4c1f36e [Sequence] Add the remove_range algorithm
Closes #52
2015-08-23 13:49:16 -04:00
Louis Dionne
e42ce66d26 [Set,Map] Optimize several methods
Fixes #63
2015-08-23 12:00:59 -04:00
Louis Dionne
12c4deeece [Set] Add missing set theoretic operations
Closes #119
2015-08-23 08:36:21 -04:00
Louis Dionne
4191151935 [Set] Optimize equal for sets with different lengths 2015-08-23 07:52:15 -04:00
Louis Dionne
89c61aec67 Use ::value instead of {}() everywhere 2015-08-23 07:52:14 -04:00
Louis Dionne
c3fdac36e2 [concat] Remove unused implementation for non-Foldable Sequences
Since a42544d, all Sequences are finite, and hence they are also Foldable
because finite Iterables must be Foldable. Hence, the implementation of
concat for non-Foldable Sequences is useless.
2015-08-22 11:28:33 +01:00
Louis Dionne
f9ff1d59c6 [Metafunction] Use @snippet instead of @include where it makes more sense 2015-08-20 18:17:24 +01:00
Louis Dionne
dcd930fa55 [Metafunction] Add rationale for the lack of Comparable model 2015-08-20 18:14:54 +01:00
Louis Dionne
cfb83c3394 [Doc] Fix broken example paths 2015-08-18 18:27:35 +01:00
Louis Dionne
08b3db1708 [Examples] Modularize and use qualified names
This patch modularizes the examples, makes them self-contained and
also uses qualified hana:: names.

Fixes #139
Fixes #126
2015-08-15 17:50:40 +02:00
Louis Dionne
02242e38b4 [Sequence] Remove unused implementation of equal for infinite sequences 2015-08-15 10:13:01 +02:00
Louis Dionne
e5e1f761f9 [Searchable] Add the is_disjoint algorithm
Partially addresses #119
2015-08-12 22:00:32 +02:00
Louis Dionne
f6fbd028ba [Struct] Move the BOOST_HANA_{ADAPT,DEFINE}_STRUCT macros to their own headers 2015-08-09 10:55:15 +02:00
Louis Dionne
c63950a25c [drop_front] Add missing include 2015-08-09 10:09:54 +02:00
Louis Dionne
9771a2f0ed [Doc] Re-document the Functional module. 2015-08-09 09:00:31 +02:00
Louis Dionne
d6c4befe10 [Doxygen] Remove spurious warnings. Common Doxy... 2015-08-08 16:56:05 +02:00
Louis Dionne
fd63f651d0 Add basic_tuple, a minimal version of the tuple 2015-08-08 13:16:02 +02:00
Louis Dionne
6b94de8ed3 [Either] Remove leading underscores forgotten in a5e5ee9 2015-08-08 11:37:59 +02:00
Louis Dionne
a5e5ee90bd Remove most leading underscores from names in the hana:: namespace
Fixes #130
2015-08-08 11:24:17 +02:00
Louis Dionne
e20239a0d0 [assert.hpp] Use ::value instead of {}() in static_asserts 2015-08-03 19:24:24 +02:00
Louis Dionne
8036357a37 Use detail::fast_and instead of more involved hana::all on bool array 2015-07-28 20:23:21 +02:00
Louis Dionne
e64c57d6e6 [at] Add missing cstddef include 2015-07-26 18:06:16 +02:00
Louis Dionne
96b0cc3169 [GCC] Fix some GCC warnings and errors 2015-07-26 18:06:16 +02:00
Louis Dionne
7af88b6cc3 [fusion::deque] Workaround Boost 1.57.0 bug triggered in tail 2015-07-26 13:53:40 +02:00
Louis Dionne
0893ae57f7 [Fusion adapters] Don't test the full laws, only the implemented methods
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.
2015-07-26 12:42:20 +02:00
Louis Dionne
9d74084996 Remove take_until and some xxx_exactly variants
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.
2015-07-26 12:42:20 +02:00
Louis Dionne
8a0ddb0fa7 [Closure] Reimplement the closure to be almost standards-conforming
Also, use that closure to implement basically all containers.
The new closure compresses empty types.

Fixes #123
Fixes #93
Fixes #89
2015-07-26 12:42:20 +02:00
Louis Dionne
8145d66422 [Iterable] Require length to implement unpack 2015-07-25 16:20:48 +02:00
Louis Dionne
bf232cb5a7 [Tuple] Make the definition as minimal as possible 2015-07-25 16:20:48 +02:00
Louis Dionne
6f73c881b3 [ext::boost::Tuple] Workaround non-variadic implementation of boost::tuple
Yeah, this is a cheap workaround, but I'm not going to lose any time
with this old cruft. Sorry.
2015-07-25 16:20:48 +02:00
Louis Dionne
a42544da1e [Sequence] Enforce the finiteness of Sequences and reword the laws
Also, optimize `equal` for sequences.

Fixes #39
2015-07-25 16:20:48 +02:00
Louis Dionne
cecaf823f6 [Iterable] Replace front by at in the MCD to allow more efficient algorithm implementations
Related to #158
2015-07-25 16:20:48 +02:00
Louis Dionne
3e50562a48 [Iterable] Optimize drop_{while,front} for finite Iterables 2015-07-25 16:20:47 +02:00
Louis Dionne
d3b7cb2c85 Modularize the headers
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
2015-07-25 16:20:47 +02:00
Louis Dionne
83c3b4781e [Doc] Move the tutorial out of hana.hpp
Fixes #161
2015-07-07 21:26:11 +02:00
Louis Dionne
508d59cab9 [Doc] Add a cheatsheet for the data types.
Fixes #124
2015-07-02 00:22:53 +02:00
Louis Dionne
52b150951d [Doc] Move prerequisites and installation to the tutorial
Fixes #128
2015-06-30 21:58:35 +02:00
Louis Dionne
af7db4c80e [Doc] Fix typo "names" => "named"
Thanks @Manu343726
2015-06-29 19:28:39 +02:00
Louis Dionne
dcfdb09ff9 [Struct] BOOST_HANA_ADAPT_STRUCT does not require the types of the members
Fixes #152
2015-06-28 21:01:09 +02:00