This commit is contained in:
Light-City
2019-12-25 21:06:30 +08:00
parent 8544284f51
commit 095ebc9011
8 changed files with 148 additions and 29 deletions

View File

@@ -0,0 +1,13 @@
//
// Created by light on 19-12-25.
//
#include <iostream>
#include <cassert>
int main() {
const int alignment=5;
assert((alignment & (alignment - 1)) == 0);
static_assert((alignment & (alignment - 1)) == 0, "Alignment must be power of two");
return 0;
}