Commit Graph

19 Commits

Author SHA1 Message Date
Louis Dionne
d7efa66130 Remove unused variable warnings with recent Clang 2018-11-09 00:25:30 -08:00
Louis Dionne
5af6066e61 Make some containers final and add notes about assumptions about representation
Also, add tests to make sure that an empty pair can be EBO'd. This one is very
important because a typical use case is to create a tuple of pairs of empty
types (e.g. in hana::map), and we expect this to be empty.
2018-05-06 10:08:49 -06: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
9895803ede Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
Louis Dionne
b94551b1b8 [pair] Add better tests for copy/move ctor from pair with convertible members 2016-12-03 17:59:06 -08:00
Louis Dionne
75f6be09ce Return references from at, at_key & friends
Resolves #90
2016-02-05 18:19:23 -05: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
ef3d46e8aa [hana::pair] Document the constructors and add unit tests 2015-09-07 14:28:35 -04:00
Louis Dionne
647ad436b0 Reorganize the unit tests and increase the overall coverage. 2014-11-04 08:54:58 -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
2d10fb461a Use minimal includes in unit tests. 2014-09-01 18:14:55 -04:00
Louis Dionne
cbeb6ae983 Core: add the make function 2014-08-25 12:33:49 -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
d132db0ebf Use finer grained assertions acknowledging Constants 2014-08-05 10:37:54 -04:00
Louis Dionne
41d6b75bc2 Add the product Type class and make Pair a simple data type 2014-07-28 18:35:57 -04:00
Louis Dionne
2eb9867ec5 Comparable: Check laws widely 2014-07-16 17:12:19 -04:00
Louis Dionne
408a5c7db5 Modularize Pair 2014-07-16 16:26:23 -04:00
Louis Dionne
16d4ea0930 Add the Pair type class and data type. 2014-06-24 21:28:20 -04:00