bt

Undocumented in source.
pure nothrow @safe @nogc
alias bt = testBit

Examples

static void test(T)() {
	const mn = T.min, mx = T.max;
	enum nBits = 8*T.sizeof;
	foreach (const ix; 0 .. nBits-1)
		assert(!mn.bt(ix));
	assert(mn.bt(nBits - 1));
	foreach (const ix; 0 .. T.sizeof)
		assert(mx.bt(ix));
}
test!byte;
test!short;
test!int;
test!long;

Meta