Commit Graph

557 Commits

Author SHA1 Message Date
Louis Dionne
5de6277f14 [Examples] Remove unecessary include of ext/std/type_traits.hpp 2015-09-08 16:16:43 -04:00
Louis Dionne
be5a787741 [CMake][Travis] Add support for building without exceptions
Also, swap the project() and the cmake_minimum_required() commands
in the top-level CMake file, as this silences a warning when building
on Cygwin. See #168.
2015-09-07 23:19:31 -04:00
Louis Dionne
f4c120441c [Sandbox] Clean up and remove obsolete files
- Promote the `Tree` experiment to an example
- Remove sandbox/string.cpp; which is nothing but string_view
- Refactor the Function example so it does not use exceptions
- Remove llist.cpp, which is a mostly uninteresting experiment
- Remove sandbox/array.cpp, which is essentially sprout::array
  (see https://github.com/bolero-MURAKAMI/Sprout)

The hidden goal of this commit is also to setup the place for building
without exceptions, by removing or modifying the tests that required
them.
2015-09-07 23:19:31 -04:00
Louis Dionne
423bc7220a [MonadPlus] Rename repeat to replicate 2015-09-07 22:43:35 -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
ac4e3bc56e [Tutorial] Use vector_tag instead of Vector in tutorial example 2015-09-03 13:29:17 -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
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
Louis Dionne
a65db394c3 [String] Add make_string, for consistency 2015-08-31 17:28:44 -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
7f933490ad [Doc] Document hana::optional instead of hana::Optional 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
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
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
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
e2c4c1f36e [Sequence] Add the remove_range algorithm
Closes #52
2015-08-23 13:49:16 -04:00
Louis Dionne
d6a435dd24 [Example] Use std::plus instead of hana::_ in Wandbox example 2015-08-23 09:03:00 -04:00
Louis Dionne
12c4deeece [Set] Add missing set theoretic operations
Closes #119
2015-08-23 08:36:21 -04:00
Louis Dionne
2661a89dd4 [Example] Add a miscellaneous example of adding a Printable concept
This allows me to get rid of an old local branch. In the future, this
should be turned into a proper example of creating a concept in the
tutorial.
2015-08-23 07:52:15 -04: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
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
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
fd63f651d0 Add basic_tuple, a minimal version of the tuple 2015-08-08 13:16:02 +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
78f056a25c [example.switchAny] Update the tutorial to use hana::pair and default_t instead of _default 2015-07-28 20:23:21 +02:00
Louis Dionne
96b0cc3169 [GCC] Fix some GCC warnings and errors 2015-07-26 18:06:16 +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
70cd321751 [example.SwitchAny] Use Hana's pair instead of broken std::pair
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.
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
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
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
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
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
1e89c69049 [CMake] Remove LIBCXX_ROOT cruft and properly explain the situation in the README
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
2015-06-24 20:07:13 -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
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
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
c4ac6d67be [Doc] Make the quickstart examples self-contained
Fixes #137
2015-06-18 21:39:27 -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
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
b5a9a2e2c9 [Foldable] Rename fold.{left,right} to fold_{left,right}
Fixes #106
2015-06-14 10:07:04 -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
78fa94047e [Example] Remove unused include_set.cpp file 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
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
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
7a4919e69d [MonadPlus] Swap the arguments of prepend and prefix 2015-06-08 18:13:04 -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
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
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
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
647e695951 [CMake] Add the check target and fix minor annoyances 2015-05-30 12:23:01 -04:00
Louis Dionne
a9cf8862aa [Foldable] Swap examples for fuse and unpack 2015-05-28 18:38:37 -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
68dfc99b11 [Doc] Improve the section on tag-dispatching 2015-05-26 11:51:53 -04:00
Louis Dionne
6159007c15 [IntegralConstant] Write proper unit tests for .times and .times.with_index 2015-05-26 11:20:03 -04:00
Louis Dionne
f81f732390 Convert some RUNTIME_ASSERTs into RUNTIME_CHECKs 2015-05-26 10:52:38 -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
6ee5137604 [GCC] Workaround GCC ICEs and bugs 2015-05-24 21:00:27 -04:00
Louis Dionne
dc909f8900 [GCC] Remove unused parameter warnings and disambiguate use of size_t 2015-05-24 21:00:26 -04:00
Louis Dionne
aa2edb08ce [CMake] Reduce the number of targets and modularize the code 2015-05-22 16:23:54 -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
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
71dc2a8f40 [Example] Fix typo and modernize slightly 2015-05-09 15:38:59 -04:00
Louis Dionne
3e0838b1e2 [Functional] Move reverse_partial from detail to functional 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
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
fba9abc845 [README] Make sure the overview fits in the frame 2015-05-01 15:58:09 -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
e6d0fa9487 [CMake] Use Find modules to find optional external libraries 2015-04-28 10:46:44 -04:00
Louis Dionne
9a412f9c39 [MPL] Add a conversion from Foldables to MPL vectors
Also, properly split the unit tests for mpl::vector
2015-04-26 14:20:15 -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
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
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
ac2f5222cd [Travis] Run the unit tests under valgrind 2015-04-18 22:36:40 -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
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
e60827d02d [Example] Add a funny use case for user defined literals 2015-04-11 14:11:24 -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
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
08e55a7bb6 Rework the relations between Foldable, Iterable and Searchable. 2015-04-10 17:46:14 -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
3053736ddd [Tuple] Optimize the equal method 2015-04-08 11:30:00 -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
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
0819846fba [Example] Add a sequence based implementation of overload_linearly 2015-04-06 15:10:27 -04:00
Louis Dionne
84bc1a6a06 [Functional] Group the examples into a single file 2015-04-06 14:58:04 -04:00
Louis Dionne
125fd45bfd [Functional] Add the overload_linearly utility 2015-04-06 14:11:42 -04:00
Louis Dionne
1d7f28f941 [CMake] Improve the build system
- Simplify the compiler flag logic
- Use WARNING instead of STATUS to report caveats
- Allow specifying a custom libc++ root directory
2015-04-02 00:50:58 -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
3986e3c870 [Sequence] Fix compilation error in Sequence example 2015-03-31 19:57:09 -04:00