On Wednesday, 5 February 2020 at 01:06:46 UTC, rous wrote:
This is an example program that illustrates the issue:
import std.variant: Algebraic, This;
import std.stdio: writeln;
alias Foo = Algebraic!(This[], int);
void main()
{
Foo x = 5;
Foo y = 10;
Foo z = [x,y];
pragma(msg,
On Tuesday, 4 February 2020 at 12:05:16 UTC, rikki cattermole
wrote:
On 05/02/2020 12:55 AM, rous wrote:
On Tuesday, 4 February 2020 at 11:47:49 UTC, rikki cattermole
wrote:
It did not change type.
"Algebraic data type restricted to a closed set of possible
types. It's an alias for VariantN
On 05/02/2020 2:11 AM, Paul Backus wrote:
On Tuesday, 4 February 2020 at 11:45:50 UTC, rous wrote:
I'm defining an Algebraic type like this:
alias Expr = Algebraic!(This[char], string, int);
However, when I create an Expr from an associative array of chars and
Exprs, the Exprs seem to change
On Tuesday, 4 February 2020 at 11:45:50 UTC, rous wrote:
I'm defining an Algebraic type like this:
alias Expr = Algebraic!(This[char], string, int);
However, when I create an Expr from an associative array of
chars and Exprs, the Exprs seem to change from Algebraic to
VariantN!32LU types. This
On 05/02/2020 12:55 AM, rous wrote:
On Tuesday, 4 February 2020 at 11:47:49 UTC, rikki cattermole wrote:
It did not change type.
"Algebraic data type restricted to a closed set of possible types.
It's an alias for VariantN with an appropriately-constructed maximum
size."
On Tuesday, 4 February 2020 at 11:47:49 UTC, rikki cattermole
wrote:
It did not change type.
"Algebraic data type restricted to a closed set of possible
types. It's an alias for VariantN with an
appropriately-constructed maximum size."
https://dlang.org/phobos/std_variant.html#.Algebraic
I'm defining an Algebraic type like this:
alias Expr = Algebraic!(This[char], string, int);
However, when I create an Expr from an associative array of chars
and Exprs, the Exprs seem to change from Algebraic to
VariantN!32LU types. This is illustrated in the following error
message:
cannot
It did not change type.
"Algebraic data type restricted to a closed set of possible types. It's
an alias for VariantN with an appropriately-constructed maximum size."
https://dlang.org/phobos/std_variant.html#.Algebraic