andTemplates

Create predicate template returning true iff there are no templates or all templates return non-zero.

template andTemplates (
templates...
) {}

Members

Templates

andTemplates
template andTemplates(T...)
Undocumented in source.

Examples

t
{
	import std.traits: isIntegral, isSigned;

	alias isSignedIntegral = andTemplates!(isIntegral, isSigned);
	static assert( allTuple!(isSignedIntegral,  int,  short, long));
	static assert(!anyTuple!(isSignedIntegral, uint, ushort, ulong));

	alias isShort = andTemplates!(isSignedIntegral, unaryPred!`is(T == short)`);
	static assert( isShort!short);
	static assert(!anyTuple!(isShort, int, long, uint, ushort, ulong)

Meta