Algebra With Types

H. S. Teoh via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Apr 21 12:10:26 PDT 2017


On Fri, Apr 21, 2017 at 06:54:38PM +0000, David Sanders via Digitalmars-d-learn wrote:
[...]
> Now, I need help on concatenating Template Sequence Parameters. See
> the block comments below.
[...]
> 	} else static if (is(T _ == VariantN!V, V...)) {
> 		static if(is(U _ == VariantN!W, W...)) {
> 			alias type = Algebraic!/* Concatenate V[1..$] with U[1..$] */

Easy:

	alias type = Algebraic!(V[1..$], U[1..$]);

Template argument lists automatically expand, so this should do exactly
what you want.


T

-- 
An elephant: A mouse built to government specifications. -- Robert Heinlein


More information about the Digitalmars-d-learn mailing list