Commit Graph

1973 Commits

Author SHA1 Message Date
Louis Dionne
5560e08bd2 [Foldable] Document the signature of reverse_fold
Fixes #131
2015-06-17 10:20:52 -04:00
Louis Dionne
127304dcdf [Examples] Disable tutorial/introduction.cpp when Boost is not found 2015-06-16 13:30:39 -04:00
Louis Dionne
18d39cd410 [Sequence] Rename scan.{left,right} to scan_{left,right}.
Partially addresses #114
2015-06-16 13:00:15 -04:00
Louis Dionne
61103afeeb [Doc] Add rationale for name choices and parameter order in the general case 2015-06-15 16:23:16 -04:00
Louis Dionne
49d3355f73 [Sequence] Modernize example of the Monad model 2015-06-15 16:06:08 -04:00
Louis Dionne
cb52aa6a77 [Examples] Modernize and prettify some examples 2015-06-14 17:18:15 -04:00
Louis Dionne
7150695767 [Foldable] Use underscore syntax for monadic folds
Also,
- Fix broken reference to fold_right/fold_left in the cheatsheet

Partially addresses #114
2015-06-14 16:56:24 -04:00
Louis Dionne
2f4bd71686 [Tests] Group the unit tests for Foldable and Sequence mcds 2015-06-14 12:51:37 -04:00
Louis Dionne
724b2b36f1 [Iterable] Provide only Iterable::fold_right_impl
- This fixes a bug where we used `init` in Iterable::fold_right_impl
- Also fixes the Foldable's default implementation of fold_right without a state
2015-06-14 12:41:24 -04:00
Louis Dionne
3a13f0a8f7 [Struct] Make the accessors created by struct macros constexpr
Also,
- Add missing includes to the struct_macros.hpp header
- Make sure we avoid issue #113

Fixes #112
Fixes #113
2015-06-14 12:13:21 -04:00
Louis Dionne
55c095ebbb [Foldable] Remove fold_right from the MCD
Also,
- Document the fact that the default `unpack` is inefficient
- Give a single implementation of `length` in terms of `unpack`
- Doxygen: product = see documentation

Fixes #108
2015-06-14 10:59:07 -04:00
Louis Dionne
b5a9a2e2c9 [Foldable] Rename fold.{left,right} to fold_{left,right}
Fixes #106
2015-06-14 10:07:04 -04:00
Louis Dionne
a262378bea [Foldable] Minor rewording
- Reword the documentation for provided conversion to Sequence
- Reword the rationale for needing sum<M> and product<R>

Addresses #105
Related to #109
2015-06-13 17:16:49 -04:00
Louis Dionne
7fb312a225 [Doc] Superclass -> Refined concept
Fixes #102
2015-06-13 15:26:26 -04:00
Louis Dionne
b069cca0f2 [Doc] Reorganize the mcd/laws/etc.. sections in the reference of concepts
Fixes #101
2015-06-13 15:00:23 -04:00
Louis Dionne
4958b6d5ac [Doc] Various documentation improvements
- Rename "tag-dispatching" -> "tag dispatching"
- Split conclusion
- Add section on Tags
- Remove usages of "generalized types"
- Document the syntax of function signatures

Closes #94
2015-06-13 13:32:39 -04:00
Louis Dionne
93067e0176 [Doc] Add rationale for using our own Tuple type
Addresses #88
2015-06-13 09:58:05 -04:00
Louis Dionne
bd50d5f651 [Doc] Methods -> Functions in the reference
Fixes #98
2015-06-13 09:47:22 -04:00
Louis Dionne
cf5d895280 [Boost] Remove pessimizing std::move 2015-06-12 19:27:06 -04:00
Louis Dionne
f47c52b07f [Travis] Properly allow failures on Clang trunk and Boost trunk 2015-06-12 18:57:31 -04:00
Louis Dionne
350f68c523 [Travis] Add a job testing without the concept checks 2015-06-12 17:30:37 -04:00
Louis Dionne
d99899cb02 [IntegralConstant] Guarantee the order of execution for .times.with_index 2015-06-12 17:30:37 -04:00
Louis Dionne
d04b175eb3 [Map] Fix test broken by 71ca00dcf7 2015-06-12 16:40:26 -04:00
Louis Dionne
78fa94047e [Example] Remove unused include_set.cpp file 2015-06-12 15:23:07 -04:00
Louis Dionne
36575dbb89 Fix a bug when checking models<> for concepts with binary methods
Also, check the models<> metafunction properly in the laws.

Fixes #91
2015-06-12 15:23:07 -04:00
Louis Dionne
71ca00dcf7 [Map,Set] Make sure make<..> is passed compile-time Comparable keys 2015-06-12 15:23:07 -04:00
Louis Dionne
1022f74fa7 Remove our partial <type_traits> reimplementation
There was a legitimate reason to have this duplication when the library
was much smaller. However, hovering at about 30 kLOCs, the library is
definitely not small enough anymore to mandate reimplementing our own
<type_traits>. Also, most user code will probably include <type_traits>
anyway, so using <type_traits> will not increase the overall compilation
time in actual code bases.

Finally, this gives us much more flexibility, like the ability to
inherit our IntegralConstant from std::integral_constant, and then
return that from the traits:: metafunctions, so that operators can
be used with them.
2015-06-12 12:49:22 -04:00
Louis Dionne
75c6b8eae6 [README] Precise the contents of the cmake/ subdirectory. 2015-06-11 21:12:34 -04:00
Louis Dionne
0cbf6082c2 Add a "Try it online" link and a script to upload the library to Wandbox
Thanks a __lot__ to the people behind Wandbox for all the help!
This is related to https://github.com/melpon/wandbox/issues/153.

Closes #87
2015-06-11 20:39:35 -04:00
Louis Dionne
35cdf3b83a [Struct] Implement macros using ERB templates instead of Boost.Preprocessor
This is done because the resulting macros are much more straightforward
to debug when a user makes a mistake. Also, it avoids pulling yet another
dependency.

Also added some general purpose macros in detail/preprocessor.hpp.
2015-06-10 15:50:35 -04:00
Louis Dionne
cb45867dee [Functional] Remove outdated and wrong TODO in lockstep 2015-06-10 11:06:42 -04:00
Louis Dionne
4deb7c8bf1 [Doc] Add note about the meaning of Hana in Japanese and Korean 2015-06-10 10:17:18 -04:00
Louis Dionne
9928dea216 [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.
2015-06-10 10:07:55 -04:00
Louis Dionne
3ea05a0f00 [Foldable] Use unpack instead of right fold for Foldable => Sequence conversion 2015-06-09 19:04:47 -04:00
Louis Dionne
326eba3925 [Map] Slightly optimize insert and comparison 2015-06-09 14:06:29 -04:00
Louis Dionne
72c3207135 [README] Use automatically updated version badge.
[ci skip]
2015-06-09 13:50:37 -04:00
Louis Dionne
688cdd0b59 [Map] Pretty error message when using make<Map> with non-Products 2015-06-09 00:27:57 -04:00
Louis Dionne
e32cafbf29 [Doc] Add a note about some data structures not being optimized. 2015-06-08 23:09:05 -04:00
Louis Dionne
951bc46cd2 [Range] Optimize Range operations by requiring the Range to hold IntegralConstants 2015-06-08 21:03:12 -04:00
Louis Dionne
d56aa04768 [MonadPlus] Fix bug introduced when flipping arguments to prepend 2015-06-08 19:23:53 -04:00
Louis Dionne
3d1b89a699 [Doc] Partially document external adapters 2015-06-08 18:38:03 -04:00
Louis Dionne
7a4919e69d [MonadPlus] Swap the arguments of prepend and prefix 2015-06-08 18:13:04 -04:00
Louis Dionne
bcdc8cf2cc [Doc] Add insert and insert_range to the Cheatsheet 2015-06-08 17:47:30 -04:00
Louis Dionne
09b8e38113 [Sequence] Add insert and insert_range functions
Partially addresses #52
2015-06-08 17:04:52 -04:00
Louis Dionne
92a2d425d3 [Doc] Minor documentation improvements and tweaks
- Move Functional to Details, to get more time to think about it
- Move Either to Details, to get more time to think about it
- Prettify some examples
- Better introduction of the "Data types" documentation module
2015-06-08 15:11:28 -04:00
Louis Dionne
9c2d3b396a Rename Maybe to Optional 2015-06-08 14:49:26 -04:00
Louis Dionne
ff90ce4e72 [Maybe] Add make<Maybe> and make_maybe for consistency 2015-06-07 17:43:51 -04:00
Louis Dionne
406cb49cc2 [Doc] Daily documentation improvements
- Improve the brief description of make<XXX>
- Rewrite the rationale for unspecified container types
- Update comments on some runtime benchmarks
- Rename std::decay_t(...) to std::decay_t<...> in Tuple reference
- Document data types as being Tags, not types themselves
2015-06-07 14:35:08 -04:00
Louis Dionne
0e10f93225 [README] Bump version badge to 0.3.0
[ci skip]
2015-06-07 11:44:19 -04:00
Louis Dionne
daf8fdfa45 [Benchmarks] Only enable fold_right benchmarks for Fusion with Boost 1.57.0
reverse_fold on Boost.Fusion trunk is broken too
2015-06-06 11:19:02 -04:00