Re: Comparing slices with std.variant.Algebraic

2022-09-07 Thread anonymouse via Digitalmars-d-learn
Thanks Paul. Gotta wrap my head around this well enough to update that module. However, this is a great start. Thank you very much. --anonymouse

Re: Comparing slices with std.variant.Algebraic

2022-09-05 Thread Paul Backus via Digitalmars-d-learn
On Monday, 5 September 2022 at 08:58:21 UTC, anonymouse wrote: On a related note, std.variant.Algebraic has been deprecated and the suggested replacement is std.sumtype.SumType. What is the proper way to make this conversion? Attempting to do a drop-in replacement results in the following error

Re: Comparing slices with std.variant.Algebraic

2022-09-05 Thread anonymouse via Digitalmars-d-learn
On Monday, 5 September 2022 at 10:30:32 UTC, Ali Çehreli wrote: On 9/5/22 01:58, anonymouse wrote: > array [1.7, 3.7, 5.7, 7.7, 9.7] in both cases, which is what is being > asserted by those two lines. None of those values can be represented precisely in a floating point type. Without looking

Re: Comparing slices with std.variant.Algebraic

2022-09-05 Thread Ali Çehreli via Digitalmars-d-learn
On 9/5/22 01:58, anonymouse wrote: > array [1.7, 3.7, 5.7, 7.7, 9.7] in both cases, which is what is being > asserted by those two lines. None of those values can be represented precisely in a floating point type. Without looking at the code, I wonder whether the tests will pass if you can man

Comparing slices with std.variant.Algebraic

2022-09-05 Thread anonymouse via Digitalmars-d-learn
Observe the [implementation](https://github.com/Kriyszig/magpie/blob/master/source/magpie/axis.d) of ```d stuct Axis(U...){} ``` More specifically, observe its usage in the unittests for [Binary Ops on Variant Axis](https://github.com/Kriyszig/magpie/blob/master/source/magpie/axis.d#L410-L437)