TypeTuple

Creates a typetuple out of a sequence of zero or more types. Same as GenericTuple, except it contains only types.

template TypeTuple (
Types...
) if (
isTypeTuple!Types
) {}

Members

Aliases

TypeTuple
alias TypeTuple = Types
Undocumented in source.

Examples

t
{
	alias IntDouble = TypeTuple!(int, double);

	int foo(IntDouble args)  // same as `int foo(int, double)`
	{
		return args[0] + cast(int) args[1];
	}

	alias IntDoubleChar = TypeTuple!(int, double, char);
	static assert(is(TypeTuple!(IntDouble, char) == IntDoubleChar));
	static assert(is(IntDoubleChar[0 .. 2] == IntDouble));


	version(none)
	alias BadTypeTuple = TypeTuple!(int, 5); // error: not a type tup

Meta