Comment #0 by john.loughran.colvin — 2016-09-08T23:45:53Z
import std.variant;
import std.conv;
void main()
{
Algebraic!(bool[]) a = [true];
auto b = a.visit!(to!string);
}
std/conv.d(296): Error: template instance isRawStaticArray!() does not match template declaration isRawStaticArray(T, A...)
std/variant.d(2214): Error: static assert "to(A...)(A args) if (!isRawStaticArray!A) is not a function or delegate"
std/variant.d(1991): instantiated from here: visitImpl!(true, VariantN!(16LU, bool[]), to)
visitError.d(6): instantiated from here: visit!(VariantN!(16LU, bool[]))
seems like that first error shouldn't be happening.
Comment #1 by nick — 2016-11-12T12:31:46Z
PR pending. The error is because A.length can be zero:
T to(A...)(A args) if (!isRawStaticArray!A)
Comment #2 by github-bugzilla — 2016-11-23T23:10:01Z