1 public inline constexpr nothrow long Align(long n, long alignment)
2 {
3 #assert(alignment > 0);
4 return (n + alignment - 1) & -alignment;
5 }
6
7 void main()
8 {
9 long a = Align(10, 4);
10 if (a == 12)
11 {
12 System.Console.WriteLine("Align(10, 4) is 12");
13 }
14 else
15 {
16 System.Console.WriteLine("bug");
17 }
18 }