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
Louis Dionne
327f7893ac
[std::array] Fix incorrect usage of tuple_size
...
Fixes #136
2015-06-28 13:18:03 +02:00
Louis Dionne
c6045da6ee
[Sequence] Use underscores instead of dots to name zip variants
...
Also, remove unzip since it is easily implemented with unpack and zip.
Addresses #114
2015-06-28 11:43:29 +02:00
Louis Dionne
b851f5a1cb
[Doc] Rename 'head' to 'front' in the tutorial
2015-06-28 10:45:09 +02:00
Louis Dionne
09955bf1b7
Use drop_front/drop_back front/back instead of asymmetrical names
...
- 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
2015-06-28 10:44:28 +02:00
Louis Dionne
5f959f604e
[Doc] Document the fact that conversions are documented in the source concepts
2015-06-26 18:53:40 -04:00
Louis Dionne
f82efebe76
[Docs] Add a note about the precision of benchmarks
...
Fixes #154
2015-06-26 15:58:01 -04:00
Louis Dionne
37e7513e37
[Struct] Provide a better error message when using BOOST_HANA_ADAPT_STRUCT at wrong scope
...
Fixes #153
2015-06-24 17:02:47 -04:00
Louis Dionne
c585bdc789
[Sequence] Rename unfold<S>.{left,right} to unfold_{left,right}<S>
...
Partially addresses #114
2015-06-22 18:41:07 -04:00
Louis Dionne
7ad0acf8eb
[Optional] Make the constructor explicit
...
This is a workaround to fix #149 , but a proper fix will actually require
a new closure implementation.
Fixes #149 .
2015-06-21 18:03:20 -04:00
Louis Dionne
b2c3be7ec5
[Foldable] Precise the signatures of minimum and maximum
...
Related to #110
2015-06-21 16:10:47 -04:00
Louis Dionne
1b45d87a42
[Iterable] Rename drop.at_most to drop and drop.exactly to drop_exactly
...
Partially addresses #114
2015-06-21 12:08:23 -04:00
Louis Dionne
46207eed20
[Sequence] Rename take.at_most to take, and take.exactly to take_exactly
...
Partially addresses #114
2015-06-21 11:50:02 -04:00
Louis Dionne
1959c49f4b
[Doc] Precise the rationale about tag dispatching
...
Explain that it forces the user to check semantic requirements.
Addresses #144
2015-06-21 10:00:52 -04:00
Louis Dionne
4bef99d3d0
[Core] Completely remove operators from the core
...
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 #138
Closes #30
2015-06-20 17:56:40 -04:00
Louis Dionne
93a3cc8f75
[Doc] Add a rationale for using tag-dispatching
...
Also, precise how the branches of the if_ are affected by the semantics
of the capture.
Fixes #144
2015-06-20 17:48:01 -04:00
Louis Dionne
c4ac6d67be
[Doc] Make the quickstart examples self-contained
...
Fixes #137
2015-06-18 21:39:27 -04:00
Louis Dionne
5560e08bd2
[Foldable] Document the signature of reverse_fold
...
Fixes #131
2015-06-17 10:20:52 -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
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
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
cf5d895280
[Boost] Remove pessimizing std::move
2015-06-12 19:27:06 -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
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
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
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
160a713f0a
[Doc] Document the boost::hana::literals namespace
2015-06-06 11:07:17 -04:00
Louis Dionne
898e9aa07f
[Doc] Improve the documentation as suggested by @tzlaine (Part 2)
...
- Extend the Quick Start with more small examples, and then the large
switchAny example.
- Add clarifying remarks right in front of the CheatSheet for skimmers.
Damn skimmers.
- Benchmark the compile-time of creating std::array
2015-06-05 18:47:41 -04:00
Louis Dionne
b81108cfa7
Use BOOST_HANA_DISPATCH_IF to shorten tag-dispatching errors
2015-06-05 17:27:17 -04:00
Louis Dionne
07f15e171f
Normalize the parameter order of take, suffix, remove_at, cycle and repeat
...
Closes #83
2015-06-04 22:29:13 -04:00
Louis Dionne
077dc7b6c9
[Iterable] Normalize parameter order for at and drop
...
Partially addresses #83
2015-06-04 21:13:51 -04:00
Louis Dionne
35f25cbc35
[Doc] Implement improvements suggested by @tzlaine (part 1)
...
- Remove the preface entirely
- Move the current introduction to a "Description" section
- Move the "Quadrants of computation" to the "Introduction"
- Move the current "Motivation" section to the start of the "Introduction"
- Move the section on "Introspection" higher up in the docs
- Remove the "Concept" column in the Cheatsheet, and add links to each
individual algorithm instead.
- Add a rationale for unpack's name and parameter order
- Add `fold` and `reverse_fold` to the cheatsheet
- Mention the list of all headers in the tutorial
- Add an alphabetical index with everything in the library
- Precise that smaller is better in chart subtitles
- Add benchmarks for std::make_tuple and std::get
2015-06-04 21:13:45 -04:00
Louis Dionne
555f252451
[Iterable] Rewrite any_of so it works with infinite iterables
...
Fixes #31
2015-06-03 14:41:42 -04:00
Louis Dionne
c832df8b1e
[Sequence] Add the unique{.by} algorithm
...
Partially addresses #52
2015-06-03 14:06:56 -04:00
Louis Dionne
0ff9572382
Create the detail::by helper to provide a .by static member.
...
Also improve the documentation of the algorithms with a .by version.
2015-06-03 12:17:29 -04:00
Louis Dionne
4ce522ec20
[Set, Map] Add the erase_key function
...
Partially addresses #52
2015-06-03 10:11:13 -04:00
Louis Dionne
8fd8129258
[Doc] Daily tutorial improvements
...
- Finish the section on "Introspection"
- Use a Boost "proposed" logo instead of the proper Boost logo
2015-06-02 23:52:57 -04:00
Louis Dionne
53343021b8
[Config] Refactor the config.hpp
...
- Remove unused BOOST_HANA_CONFIG_DISABLE_PRECONDITIONS macro.
- Simplify BOOST_HANA_CONFIG_CHECK_DATA_TYPES by using a negated
BOOST_HANA_CONFIG_DISABLE_CONCEPT_CHECKS instead.
2015-06-02 14:45:40 -04:00
Louis Dionne
a32de51bfa
[String] Add an optional _s user-defined literal to create Strings
...
Fixes #79
2015-06-02 14:45:38 -04:00
Louis Dionne
535bc937b6
[Type] Do not treat Types and values differently in is_valid
...
Fixes #58
2015-06-01 18:06:38 -04:00
Louis Dionne
2d7ffed101
[Doc] Daily documentation improvements
...
- Add an "Acknowledgements" section
- Rename Boost.Hana to Hana for now (not officially a Boost library)
- Partially write the section on "Introspection"
Fixes #46
I feel like the documentation now provides enough real world examples:
- switchAny
- Euclidean distance
- JSON generation (to be written)
- MPL reimplementation
2015-06-01 18:06:28 -04:00
Louis Dionne
ac04435b60
[Doc] Daily improvement of the tutorial
...
- Merge section on Amphibian Algorithms with section on Algorithms
- Replace the `decayed` pseudo-code by `std::decay_t`.
- Rewrite and move section on type computations
- Add Appendix on the MPL implementation
2015-05-31 18:57:05 -04:00
Louis Dionne
cf3908622b
[Doc] Write a section on compile-time numbers
...
Also
- move tricky content about constexpr to an appendix
- reorganize tutorial sections
2015-05-30 19:55:10 -04:00
Louis Dionne
cd38e0238a
[Doc] Italicize words from the pseudo-code glossary.
...
Fixes #74 , thanks @alexk7 for the initial suggestion at C++Now.
2015-05-28 19:26:00 -04:00
Louis Dionne
32d4c973e9
[Doc] Write new tutorial sections and reorder other sections
...
- Write sections on containers, algorithms, and runtime performance
- Make sure examples consistently use 2 space tabs
- Disable -Wunused-parameter for examples
- Resolves #70
The requirement of pure functions is now documented.
- Resolves #14
It turns out that the benefits of specifying the type of containers
seems to be essentially limited to pattern matching. This is not
enough to justify all the bad things it brings, especially
considering the fact that recursion (currently the only use
case for pattern matching) forces the creation of a new tuple
at each step, which is disastrous. The unspecified-ness of the
container's type is now documented.
2015-05-28 17:03:46 -04:00
Louis Dionne
a5245c0a72
[Core] Fix weird compilation error with is_an
on Clang 3.5
2015-05-26 15:12:44 -04:00
Alexander Kondratskiy
66c0b705e9
[Config] Define BOOST_HANA_CONFIG_CLANG for apple clang
...
See https://gist.github.com/yamaya/2924292 for version reference
[ldionne:
I reorganized how the checks for Apple's Clang are made to make them
stand on their own, and I generate a #warning whenever the Apple Clang
version is not supported.]
Closes #77
2015-05-26 13:37:39 -04:00
Louis Dionne
68dfc99b11
[Doc] Improve the section on tag-dispatching
2015-05-26 11:51:53 -04:00
Louis Dionne
7f98ff0edd
[Doc] Write a section about the different kinds of C++ computations
2015-05-25 16:27:16 -04:00
Louis Dionne
6718adbf5e
[Doc] Rewrite the 'quick start' section of the tutorial
2015-05-25 10:16:48 -04:00
Louis Dionne
cc8080e041
[Struct] Enforce a trailing semicolon after BOOST_HANA_ADAPT_STRUCT
2015-05-24 21:00:26 -04:00
Louis Dionne
2b0846a79a
Fix ODR violations caused by multiple definitions in header
...
This commit fixes issue #75 , but it does not fix the related issue #76 .
It only makes sure that function objects are not defined multiple times,
but does not ensure the uniqueness of the addresses of the function
objects, which is much harder to get right.
Fixes #75
2015-05-21 16:38:00 -04:00
Louis Dionne
8f117eaba8
[Tuple] Fix bug in flatten with GCC and remove unused variable warnings
2015-05-20 16:56:48 -04:00
Louis Dionne
0660af6a8f
[GCC] Initial port to GCC
...
- Fix ambiguous specialization in core/datatype
- [Config] Turn #errors into #warnings
- Qualify recursive calls to `apply` to make sure the right function is selected
- Remove usages of when_valid to workaround ambiguous specializations
- Use multiline comments to remove some GCC warnings with LaTeX's double backslash
- Specialize operators::of in the boost::hana::operators namespace
- Manually perform more conversions in constexpr-context
- Workaround the lack of support for constexpr-but-non-const member functions
- Disambiguate unqualified uses of size_t with hana::size_t and ::size_t
2015-05-20 16:56:34 -04:00
Louis Dionne
5019db00c4
[Detail] Make sure variadic::for_each
is constexpr
2015-05-19 11:56:19 -04:00
Louis Dionne
90ddffe54d
[Sequence] Add the cartesian_product
method
...
Also, replace the old tuple_cartesian_product by a newer, slightly
more efficient but much simpler version.
2015-05-19 11:55:50 -04:00
Louis Dionne
daea3549d5
[Struct] Add the keys method to Structs
2015-05-14 16:42:56 -06:00
Louis Dionne
f32bcc2e45
[Doc] Document concrete models for each concept
...
Fixes #72
2015-05-07 13:46:10 -04:00
Louis Dionne
306ee54366
[Tuple] Fix bug in partition/filter on Clang 3.5 introduced by 595be8b
2015-05-07 11:25:05 -04:00
Louis Dionne
595be8b7b8
[Tuple] Greatly simplify filter and partition
2015-05-06 17:22:09 -04:00
Louis Dionne
e6f4220295
[Tuple] Implement a more efficient partition
2015-05-06 16:00:25 -04:00
Louis Dionne
5ad2e3092d
[Doc] Remove old Gnuplot-based benchmarks
...
[ci skip]
2015-05-05 19:14:56 -04:00
Louis Dionne
98a3c6658c
[Benchmarks] Improve support for MPL11 and remove most homogeneous benchmarks
2015-05-05 18:46:00 -04:00
Louis Dionne
5181793455
[Tuple] More efficient implementation of filter, still not incredible
...
Also add benchmarks for filter
2015-05-05 14:05:55 -04:00
Louis Dionne
8446de09a0
[Sequence] Use pointers to avoid extra copies in partition
2015-05-04 14:01:45 -04:00
Louis Dionne
3e0838b1e2
[Functional] Move reverse_partial from detail to functional
2015-05-04 14:01:45 -04:00
Louis Dionne
d54a5fa906
Move some TODOS to GitHub issues, and remove some outdated todos
2015-05-04 14:01:45 -04:00
Louis Dionne
6ca6501278
[Searchable] Refactor the interface
...
- Rename elem to contains
- Rename subset to is_subset, and make is_subset applicable in infix notation
- Add the at_key method
- operator[] is now bound to at_key instead of find
2015-05-04 12:33:51 -04:00
Louis Dionne
334cbeb188
[Tuple] Allow brace-initializing tuple members
...
Fixes #57
2015-05-03 13:34:51 -04:00
Louis Dionne
dc56f6cebc
[String] Add conversion to char const*
and minor refactoring
...
Also
- remove useless value_type alias in String since it's not a Constant
- document why the interface is so minimal
2015-05-02 15:24:25 -04:00
Louis Dionne
65834220b7
[Type] Fix bug in the implementation of is_valid with nullary functions
2015-05-02 13:36:24 -04:00
Louis Dionne
b2145a2640
[IntegralConstant] Fix a bug with the .times function
...
Passing a normal function to .times would fail
2015-05-01 19:41:22 -04:00
Louis Dionne
3568186dac
[Type] Add the is_valid utility.
...
Also refactor the overview in the README.
2015-05-01 15:54:22 -04:00
Louis Dionne
86e2e128a4
[Tuple] Use pointers in the implementation to avoid copying stuff around
2015-05-01 13:52:29 -04:00
Louis Dionne
9a412f9c39
[MPL] Add a conversion from Foldable
s to MPL vectors
...
Also, properly split the unit tests for mpl::vector
2015-04-26 14:20:15 -04:00
Louis Dionne
6f9441fa7a
[Tutorial] Fix formatting of header in the FAQ and a precision about charts
2015-04-26 14:19:43 -04:00
Louis Dionne
b452dc4de3
Remove most usages of detail::std::forward
2015-04-26 09:22:04 -04:00
Louis Dionne
ef7dcf6800
[Tuple] Fix bug in the new optimized find_if
2015-04-25 17:57:09 -04:00
Louis Dionne
ca37fdfa4c
[Doc] Add a section on performance in the tutorial
...
Also:
- Introduce the .js charts we have in the reference
- Remove the ugly "Generated by Doxygen" footer
- Refactor the benchmarks
2015-04-25 16:31:56 -04:00
Louis Dionne
1ee3b93a08
[Tuple] Implement a more efficient drop_while and find_if
2015-04-25 16:31:50 -04:00
Louis Dionne
5419065dfa
[Sequence] Minor refactoring; NFC
2015-04-22 17:52:12 -04:00
Louis Dionne
c102989fc4
[Product] Reformulate the laws, and ask for move-independance of first and second
2015-04-22 17:38:06 -04:00
Louis Dionne
589425a6dd
[Core] Make has_operator
an IntegralConstant
...
Fixes #51
2015-04-22 07:35:11 -04:00
Louis Dionne
8e427f2c83
[Searchable] Provide an operator[] equivalent to find
2015-04-21 21:56:47 -04:00
Louis Dionne
a3ce836049
[Searchable] Document structure-preserving functions and allow cross-type dispatching in subset
2015-04-21 20:23:24 -04:00
Louis Dionne
f87919b94b
[Record] Rename to Struct and refactor
...
- Define the notion of move-independence, thus relaxing the requirements on accessors.
- Rename `members` to `accessors` and use `members` to get the members only
- Document the different ways of providing a model
- Make the model of Foldable more consistent
Fixes #53
2015-04-21 16:32:33 -04:00
Louis Dionne
fb518d859a
[Monad] Renaming and refactoring.
...
- Rename bind to chain
- Rename mcompose to monadic_compose
- Rewrite a large part of the documentation
- Document the limit on the arity of functions used with monadic_compose
Fixes 48
Fixes 9
2015-04-19 13:13:23 -04:00
Louis Dionne
056b072648
[Sequence] Add an example of using the Monad model for non-determinism
2015-04-15 10:06:27 -04:00
lolisa
21952b9f54
comment out unused variable.
...
[ldionne: rebase and remove the -Wno-unused-parameter flag from CMake]
Closes #43
2015-04-14 16:23:51 -04:00
Louis Dionne
0612624939
[Detail] Add basic unit tests for the constexpr algorithms.
2015-04-14 13:32:45 -04:00
Louis Dionne
686656a3f2
[Iterable] Add the drop.at_most and drop.exactly variants to drop
2015-04-12 11:29:02 -04:00
Louis Dionne
1171b83fe3
[Sequence] Add the subsequence method
...
Fixes #37
2015-04-12 10:47:12 -04:00
Louis Dionne
6abd0f9d8e
[Set] Improve the documentation and fix inconsistency in the behavior of to<Set>
2015-04-11 12:49:45 -04:00
Louis Dionne
9edc0c854f
[Foldable] Move the Foldable -> Sequence conversion to foldable.hpp
2015-04-11 12:09:01 -04:00
Louis Dionne
daaba5dfd8
[Map] Provide model of Foldable, improve docs and add insert
method.
...
Fixes #41
2015-04-11 12:09:01 -04:00
Louis Dionne
8bd84a5d4b
[Metafunction] Generalize trait
to arbitrary Metafunctions and improve docs
2015-04-11 09:29:06 -04:00
Louis Dionne
e77b55b1b4
[Iterable] Precise the laws
2015-04-10 18:00:49 -04:00
Louis Dionne
08e55a7bb6
Rework the relations between Foldable, Iterable and Searchable.
2015-04-10 17:46:14 -04:00
Louis Dionne
c434f134ba
[Applicative] Implement automatic law checking
2015-04-10 13:17:51 -04:00
Louis Dionne
06ed355b0d
[Traversable] Document the laws
2015-04-10 12:21:52 -04:00
Louis Dionne
b21fdc32de
[Detail] Remove obsolete detail::wrap utility
2015-04-10 09:38:32 -04:00
Louis Dionne
e8412cfc6a
[Detail] Regroup the STL concepts into detail/concepts.hpp
2015-04-10 09:34:17 -04:00
Louis Dionne
a12315c1a6
[Detail] Add constexpr algorithms and use them in the implementation
2015-04-10 08:33:18 -04:00
Louis Dionne
17169d99d3
[Constant] Document conversions, embeddings and related material. Fix TODOS
2015-04-09 11:18:03 -04:00
Louis Dionne
8026bd1e48
[Sequence] Require the natural isomorphism to be bijective in the laws
2015-04-09 09:38:10 -04:00
Louis Dionne
55e4a1d083
[Sequence] Try to formulate laws that make sense and improve the documentation
2015-04-09 09:27:09 -04:00
Louis Dionne
818148de6e
[Core] Document undefined behavior with operators
2015-04-08 18:28:15 -04:00
Louis Dionne
b436ff0ee6
[Sequence] Settle on the semantics of the slice function
...
Fixes #36
2015-04-08 17:56:28 -04:00
Louis Dionne
bccfabdef7
Add interface-level assertions in bi-dispatched methods too.
2015-04-08 17:29:57 -04:00
Louis Dionne
d85b0f7b5b
[String] Fix placement of BOOST_HANA_STRING in the documentation
2015-04-08 12:54:20 -04:00
Louis Dionne
f1cfe4ad78
[IntegralConstant] Optimize if_
and eval_if
2015-04-08 12:28:07 -04:00
Louis Dionne
3053736ddd
[Tuple] Optimize the equal
method
2015-04-08 11:30:00 -04:00
Louis Dionne
22b82faacc
[Detail] Optimize the left and right variadic folds
2015-04-08 11:20:00 -04:00
Louis Dionne
bdfeb46d88
Remove outdated TODOS
2015-04-07 21:41:54 -04:00
Louis Dionne
546d0dea7b
[Tutorial] Remove redundant explanation of BOOST_HANA_CONSTANT_CHECK
2015-04-07 20:20:17 -04:00
Louis Dionne
80e0adf4e8
[Core] Move wrong to the detail namespace
2015-04-07 19:37:28 -04:00
Louis Dionne
5c1a752a9f
[Pair] Remove the pair
constructor in favor of make_pair
2015-04-07 19:26:59 -04:00
Louis Dionne
dbdd7e61e9
[Functor] Document natural transformations
2015-04-07 19:09:38 -04:00
Louis Dionne
bcefabf759
[Functional] Rewrite the documentation for demux
2015-04-07 18:42:43 -04:00
Louis Dionne
0246c59c6c
[Sandbox] Remove the hana/sandbox folder and put everything in test/sandbox
2015-04-07 16:52:20 -04:00
Louis Dionne
40216cde23
[MonadPlus] Add the remove and remove_if functions to MonadPlus
2015-04-07 16:27:39 -04:00
Louis Dionne
0a46420c02
[Type] Major refactoring and improvements
...
- Make decltype_ the identity on Types
- Add the alignof_ function
- Allow sizeof_ to work with non-Types
- Remove the trait_ helper
- Allow Metafunctions to be called with non-Types
- Add make<Type>, which is equivalent to decltype_
2015-04-07 12:12:52 -04:00
Louis Dionne
84bc1a6a06
[Functional] Group the examples into a single file
2015-04-06 14:58:04 -04:00
Louis Dionne
3c2aa421b5
[Tuple] Provide efficient folds for tuple_t
...
Fixes #32
2015-04-06 14:28:09 -04:00
Louis Dionne
125fd45bfd
[Functional] Add the overload_linearly utility
2015-04-06 14:11:42 -04:00
Louis Dionne
13392c7ed2
[Foldable] Use overloads for {maximum,minimum}_by
2015-04-01 19:28:42 -04:00
Louis Dionne
eb4f07a61c
[Sequence] Use overloads for sort/sort_by and group/group_by
2015-04-01 19:28:42 -04:00
Louis Dionne
aaaab0e11d
[Foldable] Allow specifying the Monoid/Ring for sum/product
...
Fixes #33
2015-04-01 16:19:37 -04:00
Louis Dionne
ccb2e05343
[Tuple] Move some issues to GitHub
2015-04-01 10:56:15 -04:00
Louis Dionne
38e02e9f53
[Sequence] Rename scan{l,r,l1,r1} similarly to folds
2015-03-31 17:55:27 -04:00
Louis Dionne
fe36fcd778
[Foldable] Workaround Clang 3.5/3.6 ICE in the monadic folds
2015-03-30 21:17:17 -04:00
Louis Dionne
a215f0a1b1
[Monad] Add tests for the bind method for Sequences
2015-03-30 18:30:59 -04:00
Louis Dionne
59d7e36726
[Sequence] Rename unfolds and flip their parameters
2015-03-30 18:17:42 -04:00
Louis Dionne
2c86ba2390
[Foldable] Rename the different fold variants
...
- Rename fold{l,r,l1,r1} to fold.{right,left} with overloads.
- Rename foldlM/foldrM to monadic_fold.{left,right}
- Add no-state variants of the monadic folds
- Improve the fold's documentation
- Deprecate the previous folds; they'll be removed soon
Fixes #18 .
2015-03-30 17:29:37 -04:00
Louis Dionne
540f665e51
Use static_cast<T&&> instead of forward<T> to reduce compile-times
...
It might seem overkill to do this, but I measured:
static_cast:
make compile.test.tuple 92.58s user 4.85s system 99% cpu 1:37.93 total
make compile.test.tuple 91.89s user 4.78s system 99% cpu 1:37.07 total
make compile.test.tuple 92.51s user 4.77s system 99% cpu 1:37.73 total
make compile.test.tuple 95.91s user 5.16s system 99% cpu 1:41.60 total
avg: 98.1125s
forward:
make compile.test.tuple 108.16s user 5.50s system 99% cpu 1:54.36 total
make compile.test.tuple 110.00s user 5.55s system 99% cpu 1:56.17 total
make compile.test.tuple 108.41s user 5.47s system 99% cpu 1:54.46 total
make compile.test.tuple 107.31s user 5.54s system 99% cpu 1:53.46 total
avg: 113.985s
This shows an improvement of the average by 15.8725s, which
represents about 13.9%.
2015-03-29 11:14:24 -04:00
Louis Dionne
a98d32cae1
[Maybe] *just(x) is now equivalent to from_just
2015-03-29 10:39:04 -04:00
Louis Dionne
b62460d22f
[std::tuple] Workaround libc++ bug 22806
2015-03-29 10:07:13 -04:00
Louis Dionne
1f9fcb7aca
[boost::tuple] Fix dangling reference bug
2015-03-29 01:31:31 -04:00
Louis Dionne
7402a010ec
[Tests] Track test::integer and use hana::capture instead of lambda capture to workaround Clang bug
2015-03-29 01:31:31 -04:00
Louis Dionne
637c5270ab
[Functional] Add hana::capture
2015-03-28 22:22:13 -04:00
Louis Dionne
961fd14632
[Assert] Workaround Clang bug caused by closure in BOOST_HANA_CHECK
2015-03-28 22:22:12 -04:00
Louis Dionne
4390aa98df
[Maybe] Fix bug in sfinae with non-pod arguments
2015-03-28 20:44:22 -04:00
Louis Dionne
d49db6d698
Fix dangling reference bugs in several adapters
2015-03-26 09:38:29 -04:00
Louis Dionne
beb72c224f
Remove some more usage of lambdas
2015-03-26 02:08:44 -04:00
Louis Dionne
450c71c3b6
[Logical] Use perfect forwarding in eval_if. Fixes #20 .
2015-03-26 00:46:59 -04:00
Louis Dionne
2ecedc140c
[Functional] Add the iterate
combinator
2015-03-25 12:26:04 -04:00
Louis Dionne
6e0a4bd70a
[Sequence] Remove usages of lambdas to workaround Clang bugs
2015-03-24 16:20:06 -04:00
Louis Dionne
63b862518b
[Fusion] Optimize concat by using fusion::join in Fusion adapters
2015-03-24 15:02:47 -04:00
Louis Dionne
85e96017f2
[Tutorial] Add a pseudo-code glossary with proper formatting
2015-03-22 17:37:46 -04:00
Louis Dionne
afa9171eec
[Foldable] Add fold and reverse_fold aliases
2015-03-22 17:18:26 -04:00
Louis Dionne
46b4def732
[Iterable] Rewrite any_of for Iterable to improve performance and work around Clang ICE
...
Partially addresses #24
2015-03-22 15:54:07 -04:00
Louis Dionne
740da060f4
Transfer some issues to GitHub so everyone can chime in
2015-03-22 13:51:49 -04:00
Louis Dionne
2bd2b1239c
Fix bugs with copy constructors in almost all the containers
2015-03-22 12:15:32 -04:00
Louis Dionne
5211da5a5d
[Logical/Lazy] Tie eval_if
and eval
together, and update the docs
...
- Improve the documentation and tests of Lazy
- Add missing `operator!` to Logical's documentation
- In `eval_if`, evaluate branches with `eval` for more flexibility
- Use `lazy` instead of ugly workarounds in Sequence and Iterable
2015-03-22 10:58:21 -04:00
Louis Dionne
2d71e3f368
[Functor] Add missing include
2015-03-21 11:51:35 -04:00
Louis Dionne
483969e68c
[Tests] Localize iteration whenever possible to reduce compile-times
2015-03-21 00:32:31 -04:00
Louis Dionne
466bb3c1ad
Add the Comonad concept and refactor Lazy
2015-03-20 11:55:32 -04:00
Louis Dionne
2679c7f0a4
[Iterable] Use only_when to implement find_if_impl
2015-03-16 11:35:11 -04:00
Louis Dionne
a8586ec181
[Lazy] Fix move from destroyed object bug
2015-03-15 00:18:32 -04:00
Louis Dionne
744ac273b4
[ext/std/vector] Monomorphic => can't be a Functor
2015-03-15 00:18:31 -04:00
Louis Dionne
1b8b5a5e2f
[ext/std/array] Can't be made a Sequence because it's homogeneous
2015-03-15 00:18:31 -04:00
Louis Dionne
bc0212c712
[Example] Move the mini-MPL to example/misc
2015-03-15 00:18:31 -04:00
Louis Dionne
463040d318
[Searchable] Rename find
to find_if
and lookup
to find
2015-03-15 00:18:31 -04:00
Louis Dionne
b69f29ac7a
[Functor] Rename replace
to replace_if
, and add replace
2015-03-15 00:18:30 -04:00
Louis Dionne
bcf573ccc6
[Functor] Rename adjust
to adjust_if
and add adjust
2015-03-15 00:18:30 -04:00
Louis Dionne
cde54c9ec0
[Foldable] Rename count
to count_if
and add count
2015-03-15 00:18:30 -04:00
Louis Dionne
112e34e8a1
[Foldable] Add a size
alias to length
2015-03-13 19:54:28 -04:00
Louis Dionne
7a309d08c6
[Type] Remove some places where we read from non-constexpr variables
2015-03-13 19:54:28 -04:00
Louis Dionne
ee329961b2
[Tutorial] Add a section on assertions
2015-03-13 12:14:35 -04:00
Louis Dionne
e0ea535bd9
[Config] Document BOOST_HANA_CONFIG_DISABLE_DATA_TYPE_CHECKS
2015-03-13 12:14:34 -04:00
Louis Dionne
1889dfcd65
[MplVector] Remove unused includes and return mpl::integral_c from equal
2015-03-13 12:14:34 -04:00
Louis Dionne
af4ff59bfb
[Core] Add is_a and make sure models<> returns an IntegralConstant
2015-03-13 12:14:32 -04:00
Louis Dionne
51c43a9c56
Include fwd/core/xxx instead of core/xxx in concept forward decl headers
2015-03-12 18:13:43 -04:00
Louis Dionne
9cc9ca4b0e
[Travis] Add support for Travis CI
2015-03-12 14:42:50 -04:00
Louis Dionne
4671796d28
[Pair] Add make_pair and improve tests
2015-03-12 11:52:51 -04:00
Louis Dionne
42573fc696
[Doc] Lift a mailing list message into documentation for eval_if
2015-03-12 11:27:11 -04:00
Louis Dionne
5433debbf8
[Map] Split unit tests and remove usage of lambda
2015-03-10 09:30:07 -04:00
Louis Dionne
53b50c835b
[Tuple] Fix ambiguous overload of transform
2015-03-10 09:30:07 -04:00
Louis Dionne
39079fa95a
[Foldable] Add monadic folds
2015-03-10 09:30:07 -04:00
Louis Dionne
656b57e80b
[ext/utility] Add traits::declval
2015-03-10 09:30:07 -04:00
Louis Dionne
aecb7dcdef
Make sure Metafunctions are as SFINAE-friendly as possible
2015-03-10 09:30:06 -04:00
Louis Dionne
ea601ddf60
[Maybe] Add the sfinae utility
2015-03-10 09:30:06 -04:00
Louis Dionne
32be2c9ef7
[Doc] Minor rewording of Maybe's doc
2015-03-08 12:38:19 -04:00
Louis Dionne
6c076555a5
[ext/] Fix std::integer_sequence and mpl::vector failing tests
2015-03-08 11:56:27 -04:00
Louis Dionne
8a73a3208e
[Map] Add make<Map> and remove map(...)
2015-03-07 21:28:07 -05:00
Louis Dionne
bd4daea264
Use models<Concept, T> instead of models<Concept(T)>, and check data types at the top level
2015-03-07 21:27:46 -05:00
Louis Dionne
d525c20397
[Detail] Add an helper to compute tuple cartesian products
2015-03-07 12:09:02 -05:00
Louis Dionne
4b44e867e1
[ext/] Add an experimental adapter for std::vector
2015-03-05 20:00:21 -05:00
Louis Dionne
0eb9c04b7e
[ext/] Remove forward declarations.
2015-03-05 19:59:10 -05:00
Louis Dionne
471a9e3239
[Documentation] Minor fixes
2015-03-05 19:44:52 -05:00
Louis Dionne
00d1cac8d2
[Tutorial] Fix typo in cheatsheet
2015-03-05 14:04:06 -05:00
Louis Dionne
bb640c350e
[Detail] Split detail::array into its own header
2015-03-05 13:18:40 -05:00
Louis Dionne
cc76ebbba2
[IntegralDomain] Use rem instead of mod, and change laws so it's consistent with %
2015-03-05 12:25:50 -05:00
Louis Dionne
e4e552401d
[std::tuple] Workaround bug in std::tuple_cat: http://llvm.org/bugs/show_bug.cgi?id=22806
2015-03-05 11:46:16 -05:00
Louis Dionne
1cca71792e
[ext/type_traits] Include ext/integer_sequence and ext/integral_constant
2015-03-05 10:31:44 -05:00
Louis Dionne
9388fe52eb
[CMake + Config] Successfully compile on Clang 3.5 and improve diagnostics
...
Also disable fusion's adapters tests, which are currently broken
2015-03-05 09:35:06 -05:00
Louis Dionne
e92a7d3a84
[functional/overload] Fix a bug with clang 3.5
2015-03-04 18:18:53 -05:00
Louis Dionne
c239b5c035
Fix bugs where we read from non-constexpr variables
2015-03-04 16:57:38 -05:00
Louis Dionne
5c1e724748
[Documentation] Remove old references to type classes
2015-03-04 16:38:02 -05:00
Louis Dionne
c93a250d87
[Constant] Make value
a nullary method depending only on the type
2015-03-04 16:36:40 -05:00
Louis Dionne
cee0c9b3ce
[Clang 3.5] Workaround some bugs
2015-03-04 16:35:17 -05:00
Louis Dionne
8e9db82e28
[Tutorial] Move the cheatsheet after the quickstart, again
2015-03-04 14:38:48 -05:00
Louis Dionne
fb7cbdf13a
[Sequence] Add missing examples
2015-03-04 14:30:41 -05:00
Louis Dionne
559c74e2dd
[Tutorial] Wording tweaks
2015-03-04 13:10:17 -05:00
Louis Dionne
55e64b9579
[Iterable] Remove some usage of lambdas and add the at operator
2015-03-04 13:10:17 -05:00
Louis Dionne
065b910128
Update copyright year.
2015-03-03 14:16:50 -05:00
Louis Dionne
f017c4493a
[Searchable] Swap {all,any,none} and their _of variant for consistency with the STL
2015-03-03 13:51:37 -05:00
Louis Dionne
fc12cee6e5
[Tutorial] Add sections on amphibian algorithms and semantics
2015-03-03 13:19:06 -05:00
Louis Dionne
da5c1a1ef1
[Ext] Re-add the old type_traits integration
2015-03-02 16:13:55 -05:00
Louis Dionne
87145a4a7f
[IntegralConstant] Use nested hana::datatype so we can inherit them
2015-03-02 09:16:59 -05:00
Louis Dionne
dd86906e2d
[Tuple] Make sure _tuple is default constructible when its elements are
2015-02-28 11:35:33 -05:00
Louis Dionne
37ab3ff31e
[Tutorial] Rewrite the introduction
2015-02-27 14:04:36 -05:00
Louis Dionne
7e2bcdfee0
[ext/mpl] MPL vectors are not Sequences anymore
2015-02-27 11:34:21 -05:00
Louis Dionne
d7f58620ff
[Example] Add a minimal implementation of the MPL
2015-02-26 12:35:06 -05:00
Louis Dionne
06037d2683
[Core] Introduce when_valid in when.
2015-02-25 12:39:06 -05:00
Louis Dionne
53b06ef572
[Range] Undeprecate range(...) for now, too many warnings in the tests
2015-02-25 12:39:05 -05:00
Louis Dionne
689ab952f8
[Orderable, Comparable] Add signatures and partially appliable methods
2015-02-25 12:39:05 -05:00
Louis Dionne
aa6eac6c3d
[Config] Move BOOST_HANA_CONSTEXPR_LAMBDA to config.hpp
2015-02-25 10:20:12 -05:00
Louis Dionne
8c00e35387
[Applicative] Add signatures and refactor laws
2015-02-25 09:19:59 -05:00
Louis Dionne
c13f660ecc
[MonadPlus] Add signatures and rename nil to empty
2015-02-25 09:19:58 -05:00
Louis Dionne
6824f2bc47
Rename has_common_embedding to has_nontrivial_common_embedding, which is more correct.
2015-02-24 20:42:03 -05:00
Louis Dionne
0f197ea93a
[Core] Properly document models
and add examples
2015-02-24 19:54:22 -05:00
Louis Dionne
771a5e39d7
[Range] Implement efficient lookup and elem methods
2015-02-24 19:54:21 -05:00
Louis Dionne
a46cd6a90c
[Tuto + Functor] Document parameterized gtypes and pimp Functor's docs
2015-02-24 19:54:21 -05:00
Louis Dionne
da687d7cc6
[Range] Implement and document make<Range>. Deprecate range(...)
2015-02-24 19:54:21 -05:00
Louis Dionne
ad171f9cea
[Make] Add a forward declaration header
2015-02-24 19:54:21 -05:00
Louis Dionne
edd086423e
[Tuple] Replace tuple(...) by make<Tuple>(...) in the docs
2015-02-24 18:15:24 -05:00
Louis Dionne
9de4d0af11
[Type] Remove Doxygen warning
2015-02-24 14:09:30 -05:00
Louis Dionne
83644e851b
[Searchable] Improve the any implementation for builtin arrays
2015-02-24 14:04:58 -05:00
Louis Dionne
bf61b312b9
[Range] Simplify and improve the implementation
2015-02-23 21:46:44 -05:00
Louis Dionne
ffd4cba716
Two-step definition for _tuple_t and _type
2015-02-23 21:46:43 -05:00
Louis Dionne
e7e9391147
[Iterable] Remove operator[] overload for const&&
2015-02-23 21:46:43 -05:00
Louis Dionne
1df1b62a8a
[Assert/String] Use models instead of is_a
2015-02-23 21:46:43 -05:00
Louis Dionne
4345e85be2
[Map] Use models
instead of is_a
2015-02-23 19:34:48 -05:00
Louis Dionne
2a8b52cf17
[Type] decltype(type<T>)
should inherit from _type<T>
2015-02-23 19:34:48 -05:00
Louis Dionne
df97a4dfc1
[Set] Add a model of Foldable
2015-02-23 15:04:45 -05:00
Louis Dionne
cc5764bc7d
[Cheatsheet] Arguments for elem
were flipped
2015-02-23 14:54:33 -05:00
Louis Dionne
4e387cc2ff
[Functional] Change the implementation of arg<n> so it can perfect forward.
2015-02-23 08:09:04 -05:00
Louis Dionne
d7bf35c7e8
[Iterable] Make foldl_impl constexpr-friendly
2015-02-22 16:50:01 -05:00
Louis Dionne
3e78af4bcb
[Tuple] Use make<Tuple>(...) instead of tuple(...)
2015-02-22 16:50:01 -05:00
Louis Dionne
7dad374f1f
[Tuple] Fix a nasty double-move in flatten
2015-02-22 16:50:00 -05:00
Louis Dionne
a25e84cf3b
[Doc] Refactor the tutorial
2015-02-22 16:50:00 -05:00
Louis Dionne
8c6bdb3a3f
[Tuple] Fix a bug in transform with tuple_t
2015-02-22 14:55:36 -05:00
Louis Dionne
f772374179
[Searchable] Add a model for builtin arrays.
2015-02-22 14:55:36 -05:00
Louis Dionne
d120513366
Rename cons to prepend and snoc to append
2015-02-22 14:55:35 -05:00
Louis Dionne
62ede37419
Rename fmap to transform
2015-02-22 14:55:35 -05:00
Louis Dionne
9e67213857
Rename zip_with to zip.with
2015-02-22 14:55:35 -05:00
Louis Dionne
734f89190c
[Core] Refactor the operator system
2015-02-20 11:05:44 -05:00
Louis Dionne
f0c66b31f8
Remove outdated core/ tests and reorganize tests
2015-02-20 11:05:44 -05:00
Louis Dionne
5464f58131
[Sandbox] Remove outdated experiments
2015-02-20 11:05:44 -05:00
Louis Dionne
4d06bf69fe
[Core] Refactor documentation and bring back stuff from split_methods branch
2015-02-20 11:05:44 -05:00
Louis Dionne
f31bb617d5
[Tuple] Implement an efficient sort for tuple_c
s
2015-02-20 11:05:44 -05:00
Louis Dionne
45387e8294
[Set] Use models instead of is_a and fix missing include
2015-02-20 11:05:43 -05:00
Louis Dionne
9604c9a9f6
Replace List by Sequence
2015-02-20 11:05:43 -05:00
Louis Dionne
8b656656b4
[IntegerList] Forgot to remove the fwd declaration header
2015-02-18 17:14:19 -05:00
Louis Dionne
eda87ce328
[Monad] Add Monad::ap_impl to simplify modelling Applicative
2015-02-17 15:11:23 -05:00
Louis Dionne
272ffa7900
Add the MonadPlus concept
2015-02-17 15:11:07 -05:00
Louis Dionne
9706eef852
[ext/fusion] Reduce code duplication
2015-02-17 02:04:24 -05:00
Louis Dionne
0cb805b4f4
[Iterable] Add TODO for drop
variants
2015-02-17 00:56:11 -05:00
Louis Dionne
964851bb76
[Foldable] Split tests and remove now useless foreign tests
2015-02-17 00:56:11 -05:00
Louis Dionne
92a526003b
[Tuple] Tentatively implement Sequence and MonadPlus operations
2015-02-17 00:56:11 -05:00
Louis Dionne
02c9c47510
Remove TypeList and IntegerList
2015-02-15 12:38:04 -05:00
Louis Dionne
efd5aa9624
[Documentation] Rename group-typeclasses to group-concepts
2015-02-15 11:42:42 -05:00
Louis Dionne
15a5a03953
[Bool] Make bool_<...> an alias to integral_constant<bool, ...>.
2015-02-15 11:27:20 -05:00
Louis Dionne
737f20a5bb
[models] Implement models for each concept; no need to explicitly specialize it
2015-02-15 10:31:12 -05:00
Louis Dionne
bec87eec87
[Functor] Properly annotate default implementations
2015-02-15 09:08:02 -05:00
Louis Dionne
337167bbb3
[Traversable] Refactor documentation and split methods
2015-02-15 09:08:02 -05:00
Louis Dionne
681116f0db
[Iterable] Refactor documentation and split methods
2015-02-15 09:08:02 -05:00
Louis Dionne
8e744413be
[Record] Refactor documentation and split methods
2015-02-13 12:00:14 -05:00
Louis Dionne
72334a8bcc
[README] Improve the examples
2015-02-12 12:37:32 -05:00
Louis Dionne
e4d75ef25a
[Foldable] Refactor documentation and split methods
2015-02-12 11:58:39 -05:00
Louis Dionne
bf34ec04e4
[Lazy] Document that operators are provided for Monad
2015-02-12 10:14:22 -05:00
Louis Dionne
c5f20a51d2
[Searchable] Split methods and refactor documentation
2015-02-12 10:10:38 -05:00
Louis Dionne
f99a35fba6
[Monad] Refactor documentation and split methods
2015-02-11 11:15:16 -05:00