Louis Dionne
45ac9deb2c
Fix missed opportunity for EBO in nested empty basic_tuples
...
Also, add tests to make sure the same does not happen in hana::pair.
2017-04-08 14:20:30 -07:00
Louis Dionne
ae2e9664ae
[bugfix] Fix incorrect result for first and second in nested pair cases
2017-04-08 14:05:57 -07:00
Louis Dionne
7f87e7ad53
[tuple] Fix misleading comment
...
[ci skip]
2017-04-08 10:48:58 -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
5901d52cd2
Rename struct_macros.erb.hpp to struct_macros.hpp.erb
2017-03-30 10:22:08 -07:00
Louis Dionne
7f2a329800
Bump version to 1.1.0
2017-02-25 13:44:37 -08:00
Louis Dionne
bd8bdefa3a
[map] Add restricted assignment operators
2017-02-21 23:32:51 -08:00
Louis Dionne
55bb4b9877
[map] Fix overly loose constructors
2017-02-11 15:40:42 -08:00
Louis Dionne
c3789c70cb
[basic_tuple] Use ebo instead of elt to implement EBO in basic_tuple
2017-02-11 15:40:42 -08:00
Louis Dionne
711e6de58a
[basic_tuple] Use at_c instead of get_impl to access basic_tuples
...
This commit decouples the underlying representation of basic_tuple from many
utilities and containers in Hana. This will lead to better support for EBO and
cleaner code, however it might result in a slight compile-time pessimization
since there's one more function instantiation than using `get_impl` directly,
and we're adding 3 overloads to `at_c`.
2017-02-11 15:40:42 -08:00
Louis Dionne
279dbaa9b5
[pair] Ensure that a pair of empty objects is empty too
...
Also, fix some overly loose constructors
2017-02-11 15:40:42 -08:00
Louis Dionne
40ca5afd7d
Add a building block for EBO in containers
2017-02-11 10:26:56 -08:00
Louis Dionne
268004e953
Remove some usages of variable templates
2017-02-07 21:27:28 -08:00
Louis Dionne
323b657bbe
[type] Improve rationale for the representation of hana::type
...
In response to #319
2017-02-05 13:41:16 -08:00
Louis Dionne
a39d2fb90c
[any_of] Fix a bug where we called the predicate once more than necessary
...
Also, add automatic unit tests for any_of, all_of and none_of. This commit
also makes it easier to add new automatic unit tests by documenting a small
shell script.
Commit triggered by http://stackoverflow.com/q/42012512/627587
2017-02-03 13:58:08 -08:00
Louis Dionne
68e5998b3c
[map] Provide a custom implementation of hana::contains
...
This should be faster than using the default implementation, which uses `any_of`.
2017-01-29 11:13:10 -08:00
Louis Dionne
c800311cae
[set] Add and document a default constructor
...
Prompted by a StackOverflow question [1], and also the fact that hana::map
supports it.
[1]: http://stackoverflow.com/q/41818061/627587
2017-01-24 08:37:04 -08:00
Louis Dionne
9895803ede
Bump copyright year to 2017
2017-01-07 14:14:18 -08:00
Louis Dionne
e6d5d59ace
Bump version number to 1.0.3 to match next expected release
2017-01-07 14:05:51 -08:00
Louis Dionne
46e9e0ab1f
[tuple] Fix ambiguous specialization on GCC
2016-12-10 19:19:29 -08:00
Louis Dionne
9d1890ec49
[tuple] Add better SFINAE to guard the variadic constructor
...
This avoids instantiating rogue constructors in some corner cases.
2016-12-10 16:59:20 -08:00
Louis Dionne
9fce3542c5
Silence -Wshadow warnings in Hana's headers
...
Warnings still trigger in the tests and examples, but not in the code of the
library itself.
Fixes #298
2016-12-04 16:49:35 -08:00
Louis Dionne
1eebdb62cb
[string] Document the default constructor
2016-12-03 20:53:04 -08:00
Louis Dionne
874f256298
[detail] Remove the dependent_on helper
2016-12-03 16:53:13 -08:00
Johel Ernesto Guerrero Peña
3b51c8b021
[doc][NFC] Documentation fixes
2016-12-01 12:34:55 -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
b87213e15f
[concept.hpp] Add missing concept Hashable to the master include
2016-11-17 08:41:00 +01:00
Louis Dionne
9657c09f68
[map] Properly constrain the variadic constructor, and remove unused ctors
2016-11-16 05:05:19 +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
9f19b9576f
[types] Use the __type_pack_element intrinsic to optimize type lookup
2016-11-04 17:13:59 -07:00
Louis Dionne
a897cb9c3f
[type] Fix documentation for metafunction & friends, which do not accept raw objects
...
This should have been fixed in b1696fe , when we removed support for this.
2016-10-23 14:40:56 -07:00
Jason Rice
ea571a11fc
Fix Github Issue 304
...
- Apparently std::array operator[] returns an lvalue reference when unpacking
a temporary std::array. Using std::get<n> returns the
proper reference type in the case of rvalues.
- Adds test by ldionne
2016-10-23 11:59:02 -07:00
Louis Dionne
f537928be1
Fix experimental::type_name, which is only supported on Clang
2016-10-03 20:15:33 -07:00
Louis Dionne
0ef96e14d6
[experimental] Implement compile-time type names
2016-10-02 18:51:03 -07:00
Louis Dionne
031b145a4d
Fix mismatching declarations of _c UDL
2016-09-28 12:28:34 -07:00
Louis Dionne
96d0fe11a7
Remove some usages of variable templates
2016-09-28 10:35:58 -07:00
Louis Dionne
e452c98015
[doc] Reformulate the laws for Comparable to avoid confusion
2016-09-28 08:12:52 -07:00
Louis Dionne
32080fefa0
[NFC] Silence Doxxygen warning
2016-09-28 08:09:54 -07:00
Louis Dionne
14bb149755
Improve error message for non-Comparable types
2016-09-27 08:53:07 -07:00
Louis Dionne
36eb9a0aaf
[print] Improve compiler error when called on a non-Printable
2016-09-12 19:36:41 -07:00
Louis Dionne
6158a36985
[decltype_] Fix typo
2016-09-12 19:27:56 -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
6e95221408
Bump to next expected version, 1.0.2
2016-08-30 18:04:01 -07:00
Louis Dionne
9c4c84b383
[v 1.0.1] Bump version for Boost 1.62.0
2016-08-24 13:58:22 -07:00
Louis Dionne
fe8d0a6957
[detail] Rename detail::swap to workaround ADL issue
...
Fixes #297
2016-07-29 09:10:14 -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
e4a3ce2666
[Travis] Update Doxygen version
...
Also, add some @cond and @endcond blocks to remove stupid Doxygen warnings.
Doxygen really can't parse C++ properly, can it?
2016-07-08 13:46:39 -07:00
Louis Dionne
5d55918535
Remove micro-benchmarks from the documentation, and mention Metabench
...
Metabench now contains almost all of Hana's algorithms, so we document
the existence of Metabench instead of redundantly generating the
benchmarks on Travis for Hana only.
2016-06-26 09:52:08 -07:00