That's right, thank you all guys. Found my mistake; should be:
serialize!(typeof(field))(__traits(getMember, output,
fieldName));
On Wednesday, 28 August 2019 at 20:56:25 UTC, Machine Code wrote:
I was writing a recursive function that uses template, I
thought it would generate the proper template function on the
fly to match the type in the parameter but it seems to not so
so and try to use the called function, resulting
On Wednesday, August 28, 2019 2:56:25 PM MDT Machine Code via Digitalmars-d-
learn wrote:
> I was writing a recursive function that uses template, I thought
> it would generate the proper template function on the fly to
> match the type in the parameter but it seems to not so so and try
>
> to use
I was writing a recursive function that uses template, I thought
it would generate the proper template function on the fly to
match the type in the parameter but it seems to not so so and try
to use the called function, resulting in the error:
Error: function foo.serialize!(B).serialize(ref B