blob: 3714e878c7a4115b4e8f456094842a3429bf14f2 [file] [log] [blame]
#pragma once
namespace eskia {
template <typename T, int N>
static constexpr int array_size(T (&)[N]) { return N; }
static constexpr bool test_array_size() {
int a[] = {0,0,0,0},
b[] = {0,0,0};
return array_size(a) == 4
&& array_size(b) == 3;
}
static_assert(test_array_size(), "");
}