Commit Graph

1973 Commits

Author SHA1 Message Date
Louis Dionne
faef709431 Minor improvements:
- Test that detail::variadic::at can handle const objects
- Add perfect forwarding in functional/id
- Sandbox: experiment with a std compatible tuple
2014-08-31 10:16:03 -04:00
Louis Dionne
028e672822 Refactor examples and fix broken links 2014-08-30 17:18:26 -04:00
Louis Dionne
8f593765a8 Set: improve Comparable example 2014-08-30 14:38:21 -04:00
Louis Dionne
af0e2444ed Set: fix the Comparable instance so it works with runtime keys 2014-08-30 14:25:56 -04:00
Louis Dionne
fadb7a2af0 Core: document how operators work. 2014-08-29 11:18:26 -04:00
Louis Dionne
26af39f3d9 Flip the arguments of several methods.
Flipped:
- traverse
- fmap, adjust, fill, replace
- drop_while, drop_until
- take_while, take_until
2014-08-29 10:24:19 -04:00
Louis Dionne
aceed6a29a Tuple: specialize make so it is more optimized 2014-08-28 12:53:33 -04:00
Louis Dionne
919bc2f465 Move for_each to Foldable and optimize it with unpack 2014-08-28 12:53:33 -04:00
Louis Dionne
d6b765f794 Add variadic::reverse_apply 2014-08-28 10:47:35 -04:00
Louis Dionne
4df525ffa1 Sandbox: improve graph-based method resolution 2014-08-28 10:32:16 -04:00
Louis Dionne
7fc29e4a3c Sandbox: experiment with autonomous methods 2014-08-27 10:33:07 -04:00
Louis Dionne
00642be684 Add the Either data type. 2014-08-26 15:09:51 -04:00
Louis Dionne
1e6d390626 Add slice_c, take_c, drop_c and at_c shorthands. 2014-08-25 17:45:10 -04:00
Louis Dionne
81a242c1f1 Replace into by make in the List type class. 2014-08-25 16:48:02 -04:00
Louis Dionne
cbeb6ae983 Core: add the make function 2014-08-25 12:33:49 -04:00
Louis Dionne
3147d9b5d5 Refactor and fix broken examples. 2014-08-25 12:33:49 -04:00
Louis Dionne
04c3fffbd8 Foreign: instantiate Foldable for builtin arrays 2014-08-25 12:33:48 -04:00
Louis Dionne
7cc729bd05 List: add the slice method 2014-08-25 12:33:48 -04:00
Louis Dionne
1463014414 Core: Using when-able metafunctions with too many arguments is an error. 2014-08-25 12:33:48 -04:00
Louis Dionne
22783efc1b Sandbox: add experimental optimized tuple 2014-08-25 12:33:48 -04:00
Louis Dionne
ae8442482d Do not bring operators in the hana namespace automatically.
This caused an issue with types defined in the hana namespace and
type class instances for foreign types. For example, doing
`Integral{} == Integral{}` would hit the recursion depth limit
because `Integral` was defined in `boost::hana`, so ADL found
`boost::hana::operators::operator==` and we recursed in the foreign
instance for `Comparable`.
2014-08-25 12:33:48 -04:00
Louis Dionne
c4e4313c8e Remove the Foreign data type.
The Foreign data type made stuff like `to<int>` become
`to<Foreign<int>>`, which is not as clean.
2014-08-25 12:33:48 -04:00
Louis Dionne
be808cca69 Re-add unit tests for Fusion adaptors 2014-08-25 12:33:48 -04:00
Louis Dionne
24d8f1f591 Workaround bugs in libc++ when adapting std::tuple. 2014-08-25 12:33:47 -04:00
Louis Dionne
084fe9582d Re-add MPL vector. 2014-08-18 19:26:29 -04:00
Louis Dionne
3692a7bb81 Add the IntegralConstant type class 2014-08-18 19:26:29 -04:00
Louis Dionne
307d3d0ec8 Huge reorganization and refactoring.
- Split type class instances into separate files
- Instances provided automatically by a type class are actually MCDs
- Test each instance in a single file, not one file per method
- Refactor the operator system to fix the ADL-related bug.
2014-08-18 19:26:29 -04:00
Louis Dionne
7894be3e2f Searchable: add the subset method 2014-08-16 14:25:58 -04:00
Louis Dionne
04ba0bc426 Core: use when instead of enable_if in convert 2014-08-16 14:25:58 -04:00
Louis Dionne
a6b978064b Uncover a bug with ADL-enabled operators 2014-08-16 14:25:57 -04:00
Louis Dionne
f2de95a841 Use detail::injection instead of a std::tuple in the tests 2014-08-16 14:25:57 -04:00
Louis Dionne
ba5a74b81f Record: workaround weird ICE in LLVM codegen after adding perfect forwarding 2014-08-16 14:25:52 -04:00
Louis Dionne
828fffdaa4 Split the type traits emulation. 2014-08-10 21:08:43 -04:00
Louis Dionne
9823128862 Add support for perfect forwarding in type class methods 2014-08-10 20:54:55 -04:00
Louis Dionne
a67c592a1f Fusion: instantiate Searchable 2014-08-10 16:46:09 -04:00
Louis Dionne
1d986e4c04 Refactor the unit tests and examples
In particular, merge some unit tests and examples to reduce compilation
times.
2014-08-10 15:42:03 -04:00
Louis Dionne
4c13c21f91 Add the IntegralDomain type class 2014-08-10 12:57:37 -04:00
Louis Dionne
f61ec22e11 Remove the Identity functor, which is now detail::Identity 2014-08-09 17:52:39 -04:00
Louis Dionne
356ee03483 Refactor the unit tests and remove some minimal instances 2014-08-09 17:49:16 -04:00
Louis Dionne
cb9be38cf1 Add the Ring type class. 2014-08-09 09:45:33 -04:00
Louis Dionne
2b76377f91 Core: replace when_valid by when + is_valid 2014-08-07 22:38:54 -04:00
Louis Dionne
4df8c27cbb Finer grained use of operators 2014-08-07 21:05:38 -04:00
Louis Dionne
e71fedf457 Sandbox: remove outdated assert experiment 2014-08-07 18:05:19 -04:00
Louis Dionne
3d5acb2080 Remove old scattered operations on variadics 2014-08-07 17:56:30 -04:00
Louis Dionne
fecf7309d1 Add the Group type class 2014-08-07 17:01:22 -04:00
Louis Dionne
6c10ce440c Add the Identity functor. 2014-08-07 16:51:50 -04:00
Louis Dionne
474543ca14 Remove documentation for the laws.hpp headers of type classes.
This will be kept for internal use only.
2014-08-07 16:51:50 -04:00
Louis Dionne
b46db0bdc0 Add the Monoid type class 2014-08-07 16:51:49 -04:00
Louis Dionne
4a3f458f71 TypeList: use Foldable::unpack_mcd 2014-08-06 22:27:53 -04:00
Louis Dionne
af36f99f5d Foldable: add unpack_mcd 2014-08-06 18:17:47 -04:00