orTemplates

Create predicate template returning true iff any template of templates return non-zero (i.e. returning false if there are no templates).

template orTemplates (
templates...
) {}

Members

Templates

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

Examples

t
{
	import std.traits: isIntegral, isFloatingPoint;

	alias isIntegralOrFloating = orTemplates!(isIntegral, isFloatingPoint);
	static assert( allTuple!(isIntegralOrFloating, int,  short, long, float, double));
	static assert(!anyTuple!(isIntegralOrFloating, bool, char));

	alias isIntegralOrFloatingOrChar = orTemplates!(isIntegralOrFloating, unaryPred!`is(T == char)`);
	static assert( allTuple!(isIntegralOrFloatingOrChar, int, short, long, float, double, char));
	static assert(!isIntegralOrFloatingOrChar!bool

Meta