Commit Graph

58 Commits

Author SHA1 Message Date
Louis Dionne
57dd98403b [example] Add comment about order of members in from_json example
[ci skip]
2017-05-18 15:25:01 -06:00
Louis Dionne
2139f76798 [example] Remove non-ascii character 2017-03-29 22:48:57 -07:00
Louis Dionne
93590abfcb [example] Add dimensional analysis example from Meeting C++ keynote 2017-03-07 19:09:43 -08:00
Louis Dionne
02afb37830 [experimental] Move experimental/ to example/misc, and do some cleanup 2017-02-18 12:43:30 -08:00
Louis Dionne
9895803ede Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
Louis Dionne
7a3e0480d4 [string] Add a model of the Monoid concept
Fixes #117
2016-11-17 13:19:58 +01:00
Louis Dionne
edbbffeea4 [type] Add hana::typeid_ and deprecate hana::decltype_
Closes #290
2016-07-17 17:28:57 -07:00
Louis Dionne
345ac93e79 Revert "[GCC] Workaround GCC bug 67364, which appears to be still open"
This reverts commit dd92656da8, which
is not required anymore because the GCC bug was fixed.
2016-03-06 09:11:07 -05:00
Louis Dionne
dd92656da8 [GCC] Workaround GCC bug 67364, which appears to be still open 2016-03-05 12:34:24 -05:00
Louis Dionne
23c3edc93b [NFC] Un-Doxygenize comments in non-header files 2016-02-04 11:07:41 -05:00
Louis Dionne
8d1e56f513 [experimental] Clean up some files that belong better elsewhere or nowhere at all 2016-01-30 14:14:53 -05:00
Louis Dionne
f7a2ac5f45 [examples] Use to_tuple instead of to<tuple_tag> 2016-01-18 17:31:59 -05:00
Louis Dionne
dc90dc52d0 Fix some Boost-inspect errors
- Non-ASCII characters
- Files not ending with a newline
- Missing copyright notices
2016-01-13 12:38:09 -05:00
Louis Dionne
d60646237d [core] Rename core/convert.hpp to core/to.hpp 2016-01-10 18:32:57 -05:00
Louis Dionne
c41a5cb6be Update copyright notices for 2016 2016-01-01 14:54:06 -05:00
Louis Dionne
850dbf7ad7 Provide an experimental print function
Closes #200
Closes #219
2015-12-09 14:47:13 -05:00
Louis Dionne
c8850d83e8 [Examples] Use boost::core::demangle instead of our own implementation
This will allow the examples to compile on platforms that
do not have the <cxxabi.h> header.
2015-11-11 17:08:15 -05:00
Louis Dionne
8b12254fbb [Examples] Add an example of deserializing JSON
In response to http://stackoverflow.com/q/33065679/627587
2015-10-12 10:45:50 -04:00
Louis Dionne
05f3763ef6 [Example] Add missing includes 2015-10-08 15:37:30 -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
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
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
5cec8b3e2e [tuple] Rename Tuple to tuple_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
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
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
ed2eca2ddb [Doc] Document hana::string instead of hana::String 2015-08-30 17:07:19 -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
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
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
a5e5ee90bd Remove most leading underscores from names in the hana:: namespace
Fixes #130
2015-08-08 11:24:17 +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
b5a9a2e2c9 [Foldable] Rename fold.{left,right} to fold_{left,right}
Fixes #106
2015-06-14 10:07:04 -04:00
Louis Dionne
7a4919e69d [MonadPlus] Swap the arguments of prepend and prefix 2015-06-08 18:13:04 -04:00
Louis Dionne
9c2d3b396a Rename Maybe to Optional 2015-06-08 14:49:26 -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
f81f732390 Convert some RUNTIME_ASSERTs into RUNTIME_CHECKs 2015-05-26 10:52:38 -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
71dc2a8f40 [Example] Fix typo and modernize slightly 2015-05-09 15:38:59 -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
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
e60827d02d [Example] Add a funny use case for user defined literals 2015-04-11 14:11:24 -04:00
Louis Dionne
8bd84a5d4b [Metafunction] Generalize trait to arbitrary Metafunctions and improve docs 2015-04-11 09:29:06 -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
0819846fba [Example] Add a sequence based implementation of overload_linearly 2015-04-06 15:10:27 -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