allSameTypesInTuple

Returns true if all types in the Tuple T are the same. TODO: Remove when this is merged: https://github.com/D-Programming-Language/phobos/pull/3395

Members

Aliases

types
alias types = T.Types
Undocumented in source.

Manifest constants

allSameTypesInTuple
enum allSameTypesInTuple;
Undocumented in source.
allSameTypesInTuple
enum allSameTypesInTuple;
Undocumented in source.

Templates

isSameTypeAsHead
template isSameTypeAsHead(U)
Undocumented in source.

Examples

alias HOTUP = Tuple!(int, int, int);
static assert(allSameTypesInTuple!HOTUP);

const HOTUP hotup = HOTUP(1, 2, 3);
static assert(allSameTypesInTuple!(typeof(hotup)));

alias HETUP = Tuple!(string, bool, float);
static assert(!allSameTypesInTuple!(HETUP));

const HETUP hetup = HETUP("test", false, 2.345);
static assert(!allSameTypesInTuple!(typeof(hetup)));

alias ZTUP = Tuple!();
static assert(allSameTypesInTuple!ZTUP);

const ZTUP ztup = ZTUP();
static assert(allSameTypesInTuple!(typeof(ztup)));

See Also

Meta