Commit Graph

25 Commits

Author SHA1 Message Date
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
9895803ede Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
Louis Dionne
23c3edc93b [NFC] Un-Doxygenize comments in non-header files 2016-02-04 11:07:41 -05:00
Louis Dionne
c41a5cb6be Update copyright notices for 2016 2016-01-01 14:54:06 -05:00
Louis Dionne
98358c5f94 [integral_constant] Refactor the documentation 2015-09-05 17:12:44 -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
d0492da082 [Doc] Document hana::integral_constant instead of hana::IntegralConstant 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
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
160a713f0a [Doc] Document the boost::hana::literals namespace 2015-06-06 11:07:17 -04:00
Louis Dionne
6159007c15 [IntegralConstant] Write proper unit tests for .times and .times.with_index 2015-05-26 11:20:03 -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
b2145a2640 [IntegralConstant] Fix a bug with the .times function
Passing a normal function to .times would fail
2015-05-01 19:41:22 -04:00
Louis Dionne
065b910128 Update copyright year. 2015-03-03 14:16:50 -05:00
Louis Dionne
aa6eac6c3d [Config] Move BOOST_HANA_CONSTEXPR_LAMBDA to config.hpp 2015-02-25 10:20:12 -05:00
Louis Dionne
3e78af4bcb [Tuple] Use make<Tuple>(...) instead of tuple(...) 2015-02-22 16:50:01 -05:00
Louis Dionne
17d2ce584c [Integral] Rename to IntegralConstant and improve the API 2015-02-10 20:03:49 -05:00
Louis Dionne
88549c004c [IntegralConstant] Remove the concept 2015-02-10 19:18:40 -05:00
Louis Dionne
8d4b34f6c2 Do not use variable templates for one, zero & al.
This is because using variable templates limits the objects to being
constexpr, or to not being constexpr (but then initializing the object
becomes an issue).

This is also a step towards being compilable by GCC 4.9, but that only
would not justify the change.
2014-11-30 20:42:29 -05:00
Louis Dionne
4009555990 Refactor and improve IntegralConstant
- Add mandatory lossless conversions between instances
- implement `common` properly
2014-11-17 09:13:48 -05:00
Louis Dionne
8756e81977 Add boost/hana/config.hpp and BOOST_HANA_*_CHECK macros. 2014-11-10 17:52:33 -05:00
Louis Dionne
049046478e Move ASSERT macros out of the details 2014-11-04 09:43:44 -05:00
Louis Dionne
b26406d649 Simplify the header hierarchy: too modular isn't good.
This essentially undo parts of 307d3d0. While it seemed a like good
idea to over-modularize type classes to reduce header dependencies, I
think it was a mistake. What 307d3d0 did was basically split each of
the components of a type class into a single header (typeclass/operators.hpp,
typeclass/mcd_1.hpp, typeclass/mcd_2.hpp, ...).

At first, it resolved many weird header dependency glitches. However, it
also made everything more complex; creating even easy type classes was
sometimes much longer than it should have been, and using type classes
was tricky because you had to know exactly what to include. It also went
against the idea of implicit type class instances being provided whenever
that's possible, which I think is a nice feature of the library. Being
dissatisfied with this, I opted for a simpler header organization with
a fwd/ directory that contains forward declaration headers, and everything
else in the same directory.

A possible objection to this change would be that you are now forced
to include sometimes more than what you strictly need when e.g. defining
an instance or using only some instance(s) of a data type. My answer to
this is that Hana is a really small library and the parsing is not
going to have a huge impact on overall compilation time. My bet is that
the time that will be saved by programmers with a simple header hierarchy
outweights the parsing time by far.
2014-10-25 09:47:05 -04:00
Louis Dionne
716ff897cc Add the Enumerable type class. 2014-10-16 20:52:29 -04:00
Louis Dionne
444ffa8d48 Improve the documentation for IntegralConstant 2014-09-03 11:06:46 -04:00