Sönke Ludwig
7c0926d17b
Merge pull request #53 from s-ludwig/field_name_fix
...
Fix compile error when naming a TaggedUnion field "move".
2020-04-07 15:43:36 +02:00
Sönke Ludwig
7b34bdadde
Fix compile error when naming a TaggedUnion field "move".
2020-04-06 13:45:16 +02:00
Sönke Ludwig
a3078c34fc
Fix another compile error related to generic visitors.
2020-04-04 15:15:53 +02:00
Sönke Ludwig
ab3e8c5cf8
Merge pull request #50 from s-ludwig/fix_generic_visitor_error
...
Avoid instantiating generic visitor with types it cannot handle.
2020-04-04 13:47:13 +02:00
Sönke Ludwig
96bff347b5
Update build status badge to travis-ci-com
2020-04-04 12:34:49 +02:00
Sönke Ludwig
7a6da0ff79
Avoid instantiating generic visitor with types it cannot handle.
...
In cases where statically typed visitors need to be defined to avoid compile errors in a generic visitor, the generic one was still instantiated with the types already handled by the statically typed one(s), possibly resulting in a compile error.
2020-04-04 12:23:14 +02:00
Sönke Ludwig
f9eb5878ad
Merge pull request #49 from Cogitri/meson
...
meson: fix build on macOS
2020-03-29 18:55:37 +02:00
Rasmus Thomsen
30b6690dca
meson: fix build on macOS
2020-03-29 08:35:24 +02:00
Sönke Ludwig
7ce23e7a2e
Merge pull request #48 from Cogitri/meson
...
Add support for building with meson
2020-03-27 20:31:18 +01:00
Rasmus Thomsen
5c29d590c9
Add meson builds to CI
2020-03-26 11:07:03 +01:00
Rasmus Thomsen
2800c0ceb2
Add support for building with meson
...
Also fix an import in taggedalgebraic.d
2020-03-26 10:51:43 +01:00
Sönke Ludwig
c658b37bdb
Merge pull request #46 from dukc/copyableUnits
...
Allowed copying of tagged unions containing unit values
2020-02-21 15:42:26 +01:00
dukc
c42c9a4e57
Allowed copying of tagged unions containing unit values
2020-02-21 18:00:19 +02:00
Sönke Ludwig
30de5843ba
Merge pull request #45 from Geod24/dip1000
...
Enable dip1000, drop support for < 2.085.1, test on OSX
2020-02-11 09:40:33 +01:00
Geod24
7d47caa87d
Enable dip1000, drop support for < 2.085.1, test on OSX
2020-02-04 13:45:42 +09:00
Sönke Ludwig
fe2447f71a
Merge pull request #40 from schveiguy/addsafeonly
...
Add safeOnly UDA, associated tests. Fix issue with opUnary.
2019-12-01 18:17:41 +01:00
Steven Schveighoffer
af42d78bf6
Add safeOnly UDA, associated tests. Fix issue with opUnary.
2019-12-01 10:54:07 -05:00
Leonid Kramer
80d8504a17
Merge pull request #43 from s-ludwig/visit_refactor
...
Fix "visit" instantiation conflict
2019-12-01 00:22:44 +01:00
Sönke Ludwig
73a494f0ae
Include the whole API in package.d
2019-12-01 00:03:18 +01:00
Sönke Ludwig
8f425b37b5
Merge all visit() implementations into a single module.
...
Avoids template instantiation conflicts introduced by adding the second visit() in taggedalgebraic.taggedalgebraic. A compatibility alias is left in the taggedunion module to avoid breaking backwards compatibility.
2019-12-01 00:03:00 +01:00
Sönke Ludwig
44a2b970af
Merge pull request #42 from schveiguy/addvisit
...
Add forwarder for visit and tryVisit from TaggedUnion to TaggedAlgebraic
2019-11-30 16:24:36 +01:00
Sönke Ludwig
a6d7a8b2ad
Merge pull request #41 from schveiguy/addgetbykind
...
Add access of value via Kind enum. Fixes #38 .
2019-11-30 16:14:08 +01:00
Steven Schveighoffer
4bcd34d417
Add forwarder for visit and tryVisit from TaggedUnion to TaggedAlgebraic
2019-11-30 09:53:45 -05:00
Steven Schveighoffer
c322e43fd4
Add access of value via Kind enum. Fixes #38 .
2019-11-30 09:30:29 -05:00
Sönke Ludwig
3d0305da16
Merge pull request #37 from schveiguy/addNullHandling
...
Allow typeof(null) to provide constructors and opAssign for TaggedUnion.
2019-11-01 09:00:47 +01:00
Steven Schveighoffer
f0d324f43f
Allow typeof(null) to provide constructors and opAssign for TaggedUnion.
...
Fixes #36 .
2019-10-30 18:12:50 -04:00
Leonid Kramer
985d50b7aa
Merge pull request #35 from s-ludwig/taggedunion_tostring
...
Add TaggedAlgebraic.toString().
2019-10-25 23:20:22 +02:00
Sönke Ludwig
b037967ed0
Add unit test.
2019-10-25 22:20:27 +02:00
Sönke Ludwig
d6d480b647
Add TaggedAlgebraic.toString().
...
Enables a better string representation, mainly useful for debugging purposes.
2019-10-25 22:16:44 +02:00
Sönke Ludwig
35058cfbc8
Merge pull request #34 from John-Colvin/fix_array_members
...
Fix non-aggregate properties
2019-10-24 21:06:17 +02:00
John Colvin
c128744e19
check sizeof
2019-10-24 17:59:04 +01:00
John Colvin
9789701e6e
fix array members
2019-10-24 17:54:00 +01:00
Sönke Ludwig
c3aa2cf750
Add API documentation links.
2019-10-11 11:20:38 +02:00
Sönke Ludwig
cde25d43bc
Merge pull request #33 from s-ludwig/issue9_bogus_hasmember_result
...
Add stronger restrictions to TA.opDispatch. Fixes #9 .
2019-10-11 11:19:43 +02:00
Sönke Ludwig
f8a9b8c651
Add stronger restrictions to TA.opDispatch. Fixes #9 .
...
Defines opDispatch as two levels of nested templates, so that the outer level only checks the member name to match any member defined by one of the contained types. This allows hasMember!TA to report proper values instead of always assuming `true`.
As a side-effect, `isOutputRange!(TA, T)` now only returns true, if any of the contained types is actually a matching output range.
2019-10-11 11:13:57 +02:00
Sönke Ludwig
152e410bdd
Merge pull request #32 from s-ludwig/upgrade_compiler_support
...
Test up to DMD 2.088.0 and LDC 1.17.0.
2019-10-11 10:45:22 +02:00
Sönke Ludwig
aa0d7c8587
Test up to DMD 2.088.0 and LDC 1.17.0.
2019-10-11 10:35:08 +02:00
Sönke Ludwig
bd26a94622
Merge pull request #31 from s-ludwig/issue_15_ref_return
...
Let all TaggedAlgebraic operations return as auto ref
2019-10-11 10:34:39 +02:00
Sönke Ludwig
f4c7030459
Let all TaggedAlgebraic operations return as auto ref. Fixes #15 .
2019-10-11 10:28:23 +02:00
Sönke Ludwig
4938007701
Merge pull request #30 from Geod24/gitignore
...
Use a more modern .gitignore
2019-06-20 12:11:18 +02:00
Geod24
defcaa7ecf
Use a more modern .gitignore
...
This repository cannot be used as a submodule because it does not ignore .a
2019-06-20 16:33:27 +09:00
Sönke Ludwig
d72ffacf9e
Fix example-
2019-04-16 12:11:14 +02:00
Sönke Ludwig
78158dbae8
Merge pull request #29 from s-ludwig/alignment_fix
...
Compute the proper struct alignment for TaggedUnion.
2019-04-16 12:02:13 +02:00
Sönke Ludwig
ba79a25298
Add explicit unit test for commonAlignment.
2019-04-16 11:49:42 +02:00
Sönke Ludwig
fd85603576
Compute the proper struct alignment for TaggedUnion.
...
Before this change, the alignment of TaggedAlgebraic was always 4, which in turn had a 50% chance of aligning 8-byte pointers on a non-8-byte boundary, causing the pointer to become invisible to the GC (and less bad, causing performance degradation when dereferencing the pointer). This would happen in particular when the total size of the TaggedUnion/TaggedAlgebraic was not divisible by 8 and an array of values was built.
2019-04-16 11:37:04 +02:00
Sönke Ludwig
bb650bd5cf
Merge pull request #28 from denizzzka/ddox_fix
...
Ddox fix, CI test added
2019-03-05 13:22:35 +01:00
Denis Feklushkin
3258572585
Ddox fix and CI test added
2019-03-05 19:04:45 +07:00
Sönke Ludwig
aa6b78783e
Merge pull request #27 from s-ludwig/detect_invalid_visitors
...
Detect types that are obviously not function literals.
2019-02-24 15:00:34 +01:00
Sönke Ludwig
141a4e290a
Detect types that are obviously not function literals.
...
This avoids extremely cryptic error messages with no pointer to the origin of the problem.
2019-02-24 14:24:37 +01:00
Sönke Ludwig
c1e3e5a6a2
Merge pull request #26 from s-ludwig/non_copyable_types
...
Fix using non-copyable types with TaggedUnion.
2019-02-24 10:53:32 +01:00