Louis Dionne
b1696fe0cc
[Metafunction] Do not automatically call decltype_ on metafunction arguments
2016-02-15 10:07:08 -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
e3f2ad9cef
[doc] Add a section on compile-time branching in the tutorial
...
Closes #147
2016-01-22 10:03:39 -05:00
Louis Dionne
f7a2ac5f45
[examples] Use to_tuple instead of to<tuple_tag>
2016-01-18 17:31:59 -05:00
Louis Dionne
08a63d6cbf
Fix more Boost-inspect errors
2016-01-15 16:50:07 -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
81ddcfafaf
Rename take to take_front
...
This improves consistency:
drop_front/drop_back
take_front/take_back
2016-01-12 10:10:03 -05:00
Louis Dionne
131c56c32a
Add the take_back algorithm
2016-01-12 10:00:11 -05:00
Louis Dionne
ca61f12562
Minor refactoring of typos and missing includes
2016-01-12 09:34:36 -05:00
Louis Dionne
d60646237d
[core] Rename core/convert.hpp to core/to.hpp
2016-01-10 18:32:57 -05:00
Louis Dionne
1026267959
[CMake] Modularize the checks for external packages
2016-01-04 14:58:11 -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
129c80b0ce
[Tutorial] Document when-based tag-dispatching
...
Closes #173
2015-11-29 11:20:01 -05:00
Louis Dionne
0e4b8abe0e
[Windows] Disable failing tests due to EBO bug, and fix broken example
...
The example/tap.cpp bug was actually interesting, so I'll document it
here. We were using `tap` with a function that performed side effects.
However, we relied on the side effects being done in a particular order
for the example to pass. This is a violation of what the documentation
says we're allowed to.
On Windows, the call convention is such that arguments are evaluated
from right to left, instead of left to right like on OS X and Linux.
Since `chain` uses `transform` and `transform` expands `f(x)...` inside
a function call, our function with side effects was being called in
reverse order as what we would have expected!
Morale: Listen to the documentation, or perish.
2015-11-18 20:18:34 -05:00
Louis Dionne
aa9ff56984
[Example] Fix compilation errors on Boost.Fusion trunk
2015-11-16 07:48:01 -05:00
Louis Dionne
a41f63693b
[Tutorial] Complete the section on external adapters
2015-11-15 15:16:31 -05:00
Louis Dionne
2a0bf6b34f
[std::ratio] Add documentation
2015-11-15 15:16:31 -05:00
Louis Dionne
b906aeb277
[std::pair] Add documentation
2015-11-15 15:16:31 -05:00
Louis Dionne
d54fb5fa32
[boost::tuple] Add documentation
2015-11-15 15:16:31 -05:00
Louis Dionne
735fc4e628
[std::tuple] Add documentation
2015-11-15 15:16:31 -05:00
Louis Dionne
371c07e62d
[std::integral_constant] Add documentation
2015-11-15 15:16:31 -05:00
Louis Dionne
11a7300651
[Fusion] Document adapters
2015-11-15 15:16:31 -05:00
Louis Dionne
f307d74daa
[mpl::list] Refactor the reference documentation
2015-11-15 15:16:31 -05:00
Louis Dionne
e93de9580c
[mpl::integral_c] Refactor the documentation
2015-11-15 15:16:31 -05:00
Louis Dionne
b86580c593
[mpl::vector] Refactor the reference documentation
2015-11-15 15:16:31 -05:00
Louis Dionne
184bdad14a
[std::integer_sequence] Document and add examples
2015-11-15 15:16:30 -05:00
Louis Dionne
11096eb1d0
[std::array] Document properly and add examples
2015-11-15 15:16:30 -05:00
Louis Dionne
4782c8a0b6
[CMake] Simplify and optimize the handling of unit tests and examples
2015-11-14 14:13:27 -05:00
Louis Dionne
b5e82061d8
Provide macros to detect the version of the library
...
Closes #189
2015-11-13 14:25:33 -05:00
Louis Dionne
e13d826496
[MPL] Add support for mpl::list
2015-11-12 14:23:15 -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
3707877225
[Iterable] Remove the tail function
...
Closes #158
2015-11-11 14:08:36 -05:00
Louis Dionne
8a643a9c14
[optional] Make the interface closer to that of std::optional
...
Also remove `only_when`, which is frankly not very useful.
2015-10-12 11:29:37 -04:00
Louis Dionne
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
55d2845f99
Fix the build on Clang 3.8
...
- Properly fetch libc++ trunk on Travis
- Remove unused variable warnings
2015-09-28 15:57:24 -04:00
Louis Dionne
42934900b8
[Struct] Add the BOOST_HANA_ADAPT_ADT macro
...
Also
- Reorganize adaptation macro unit tests
- Add BOOST_HANA_PP_DROP_FRONT and BOOST_HANA_PP_FRONT macros
2015-09-22 13:37:49 -07:00
Louis Dionne
5dd8a4c645
[Struct] Improve documentation about alternate interface for accessors
...
Addresses http://stackoverflow.com/q/32678647/627587
2015-09-21 23:54:22 -07:00
Louis Dionne
cf063a4fe3
Return hana::integral_constants from type_traits adapters
...
Also, remove the ext/std/{type_traits,utility} headers in favour of the
<boost/hana/traits.hpp> header.
2015-09-21 07:45:04 -07:00
Louis Dionne
c9784816f4
Move /test/sandbox to /experimental
...
Closes #169
2015-09-16 12:48:09 -04:00
Louis Dionne
41c64b39a9
[IntegralDomain] Rename quot/rem to div/mod
...
Fixes #180
2015-09-14 14:18:29 -04:00
Louis Dionne
4f1cbf58e9
[tutorial] Improve the section on container types and creation
2015-09-13 16:09:03 -04:00
Louis Dionne
1d7b720c95
[Enumerable] Remove that concept entirely.
...
Enumerable was not being used inside the library, and its usefulness
was questionable due to the lack of upper/lower bounds.
Closes #23
2015-09-12 17:59:58 -04:00
Louis Dionne
272e583ce5
[tuple] Optimize find_if and do minor refactoring
2015-09-12 15:07:52 -04:00
Louis Dionne
136ba9be56
[IntegralConstant] Add the repeat
algorithm
...
Fixes #100
2015-09-09 15:37:31 -04:00
Louis Dionne
da0a8281d1
Replace decltype(xxx_c) patterns by their actual types
2015-09-09 15:26:19 -04:00
Louis Dionne
b87e1a96aa
[Example] Add missing include to example/basic_type.cpp
2015-09-09 15:21:04 -04:00
Louis Dionne
a7f25d124e
[slice] Accept an arbitrary Foldable of indices, and remove subsequence
...
Fixes #84
2015-09-08 17:29:54 -04:00
Louis Dionne
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