View source code
Display the source code in core/bitop.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Function core.bitop.bt

Tests the bit. (No longer an intrisic - the compiler recognizes the patterns in the body.)

int bt (
  scope const(ulong*) p,
  ulong bitnum
) pure nothrow @nogc;

Example

size_t[2] array;

array[0] = 2;
array[1] = 0x100;

assert(bt(array.ptr, 1));
writeln(array[0]); // 2
writeln(array[1]); // 0x100

Authors

Don Clugston, Sean Kelly, Walter Bright, Alex Rønne Petersen, Thomas Stuart Bockman

License

Boost License 1.0