XECOUNT to countof.

This commit is contained in:
Ben Vanik
2014-08-16 17:58:33 -07:00
parent 187d0ad277
commit f2a9fa3bf9
30 changed files with 195 additions and 175 deletions

View File

@@ -20,6 +20,11 @@
namespace poly {
template <typename T, size_t N>
size_t countof(T (&arr)[N]) {
return std::extent<T[N]>::value;
}
// Rounds up the given value to the given alignment.
template <typename T>
T align(T value, T alignment) {