MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / IsAligned

Function IsAligned

Bcore/src/main/cpp/base/bit_utils.h:195–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193
194template<int n, typename T>
195constexpr bool IsAligned(T x) {
196 static_assert((n & (n - 1)) == 0, "n is not a power of two");
197 return (x & (n - 1)) == 0;
198}
199
200template<int n, typename T>
201inline bool IsAligned(T* x) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected