Commit Graph

557 Commits

Author SHA1 Message Date
Louis Dionne
26f59c645f [example] Avoid ambiguity with ::sqrt 2019-07-29 10:23:55 -04:00
Louis Dionne
d7efa66130 Remove unused variable warnings with recent Clang 2018-11-09 00:25:30 -08:00
Zach Laine
7adb3f4b31 Rename check to hana_check
If a "check" target exists, give it a dependency on hana_check. Also, add a custom target check that depends on hana_check otherwise.

Closes  (#422)
2018-09-20 14:47:24 -04:00
Louis Dionne
725f60f13c [example] Remove remaining uses of the _s operator 2018-06-19 21:12:13 -07:00
Louis Dionne
c334974abe [type] Make metafunction & friends SFINAE friendly
Also add a section to the tutorial showing how to use this functionality.
2018-06-19 21:07:14 -07:00
Louis Dionne
99d68835ce [examples] Use BOOST_HANA_STRING instead of _s operator
Fixes #401
2018-06-04 11:33:03 -07:00
Jason Rice
5df3603f1b [tuple] remove superfluous conversion in example 2018-05-06 10:13:03 -06:00
Louis Dionne
1aa52a9726 [string] Add a conversion from a Constant holding a char const*
Closes #347
2018-02-21 00:23:17 -08:00
Louis Dionne
cddbcd6d3a [Travis] Add tests on Clang 5.0
Also bump patch-level of Clang 4.0.
2018-01-25 19:46:01 -08:00
Louis Dionne
11e3869648 Add take_back_c
This fixes a consistency issue where take_front_c was provided, but take_back_c
was not.

Closes #372
2017-11-25 11:13:48 -08:00
Louis Dionne
d9da8776aa Work around nasty GCC 7 regression
This allows making the GCC 7 Travis job non-optional. When/if the bug
gets fixed and patched in GCC 7, the work around can be undone.

Bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81525
2017-07-23 10:07:13 -07:00
Louis Dionne
d2ef6cc3b0 Fix some erroneous usages of BOOST_HANA_CONSTEXPR_LAMBDA that went unnoticed 2017-07-22 13:13:04 -07:00
Louis Dionne
c353ccdd9b [config][assert] Prepare support for constexpr lambdas in C++17
When C++17 is supported, constexpr lambdas can be used and CONSTEXPR_ASSERT
turns into an actual static_assert. This is not unconditionally enabled for
now because Clang does not support constexpr lambdas with captures (!).
2017-07-22 13:13:04 -07:00
Louis Dionne
8677867c09 Work around warnings emitted in C++17 2017-07-22 12:32:52 -07:00
Louis Dionne
84e74c1f44 [example] Use hana::type in more straightforward manner 2017-07-22 10:11:10 -07:00
Louis Dionne
d1ea99a84e [CMake] Properly quote file paths 2017-06-24 14:53:10 -07:00
shreyans800755
220017be7f [symmetric_difference] Add tests and example for map
Closes https://github.com/boostorg/hana/issues/341
2017-06-19 01:08:35 +05:30
shreyans800755
d70b015cbe [map] Add difference method for map
Closes https://github.com/boostorg/hana/issues/341
2017-06-19 01:08:35 +05:30
shreyans800755
074a5fa420 [map] Add intersection method for map
Closes https://github.com/boostorg/hana/issues/341
2017-06-19 01:08:34 +05:30
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
32b67b91cd [example] Add example of comparing structs using all_of 2017-05-18 15:12:43 -06:00
Louis Dionne
8b2bf22c2d [std.array] Fix UB in std.array.less for empty array
We were using `&arr[0]` on empty arrays, which is technically UB since `arr[0]`
is UB on empty arrays. This triggered an infinite loop on Clang-on-Windows.
2017-05-13 12:59:45 -07:00
Louis Dionne
33565392ea [union_] Document separately for map and set
Related to #299
2017-04-22 17:22:45 -07:00
shreyans800755
47fe8af1f2 [map] Added union_ method to merge two maps 2017-04-22 16:39:13 -07:00
Jason Rice
6d086796a3 [index_if] New index_if function
- Adds index_if
    - Rewrites detail::index_if to use recursive alias stuff
      optimized for tuple and basic_tuple
    - find_if now uses index_if for Iterables
    - at_key now uses index_if for Sequence
    - Removes duplicate code and unnecessary special case implementations
        - detail::advance_until
        - at_key::advance_until
        - tuple_tag implementation of find_if
    - Uses Foldable instead of Sequence for cases where length is known.
      (find_if had a specialization when Iterable and not Sequence)
    - Adds test.*.auto.index_if for Sequences
    - Adds test support/counter for testing infinite iterables
2017-04-07 16:19:52 -07:00
Louis Dionne
2139f76798 [example] Remove non-ascii character 2017-03-29 22:48:57 -07:00
Louis Dionne
a0a8ecc061 [CMake] Do not include Boost headers globally 2017-03-29 22:08:04 -07:00
Louis Dionne
d53ef246fd Generate a HanaConfig file that exports the Hana target
This supersedes the `FindHana.cmake` module that we used to provide, which was
buggy and was not the proper way of giving an easy integration for CMake users.

Fixes #328
2017-03-29 21:41:07 -07:00
Louis Dionne
93590abfcb [example] Add dimensional analysis example from Meeting C++ keynote 2017-03-07 19:09:43 -08:00
Louis Dionne
aa6c6982a8 [example] Fix typo
[ci skip]
2017-03-04 10:00:09 -10:00
Louis Dionne
ebbe97e8c0 [example] Improve example for zip_with
Thanks to @brunocodutra for the example.
2017-03-04 07:53:53 -10:00
Louis Dionne
02afb37830 [experimental] Move experimental/ to example/misc, and do some cleanup 2017-02-18 12:43:30 -08:00
Louis Dionne
50336d4aeb [CMake] Use per-target properties instead of populating global flags 2017-02-10 08:07:44 -08:00
Louis Dionne
478b5cc690 [CMake] Handle Valgrind through CTest, without a custom boost_hana_add_test 2017-02-08 07:57:13 -08:00
Louis Dionne
268004e953 Remove some usages of variable templates 2017-02-07 21:27:28 -08:00
Louis Dionne
e6c45f62da Bump more copyrights to 2017 2017-01-08 11:34:49 -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
9fe9d2f0d7 Make sure concepts inherit from an integral_constant
Fixes #269
2016-11-17 08:41:27 +01:00
Louis Dionne
e3e8736aab [map] Allow declaring maps using map<Pairs...>, and provide a variadic constructor 2016-11-14 18:56:22 -08:00
Louis Dionne
90ae512da6 [string] Add a c_str() method 2016-11-08 06:57:58 -08:00
Louis Dionne
8f8794fd28 [CMake] Add the hana interface library
Also, simplify the example/test setup by removing the tests.quick target
2016-10-10 20:52:54 -07:00
Louis Dionne
96d0fe11a7 Remove some usages of variable templates 2016-09-28 10:35:58 -07:00
Marcel Raad
1b005c5679 Unblock testing with MSVC
MSVC doesn't like the #warning directive and issues a fatal error.
It also sets _MSVC_LANG to 201402 for C++14 instead of __cplusplus,
but that's the minimum value anyway.
It also doesn't like using {} instead of ::value for some type traits
sometimes and issues an error about a missing default constructor.

[ldionne: add full break after first line in commit message]
2016-08-30 19:15:27 -07:00
Louis Dionne
edbbffeea4 [type] Add hana::typeid_ and deprecate hana::decltype_
Closes #290
2016-07-17 17:28:57 -07:00
Louis Dionne
388b690354 Remove the wandbox.py script to upload an example to Wandbox
We will not need this script anymore, since we can use the version of Hana
released with Boost on Wandbox.
2016-06-12 12:07:41 -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
eaa4cd7f8e [map] Reimplement hana::map using a hash table 2016-02-16 15:50:41 -05:00
Louis Dionne
3a2ad0b2b5 [Hashable] Improve documentation and tests 2016-02-16 15:24:23 -05:00