7 lines
147 B
C++
7 lines
147 B
C++
#pragma once
|
|
|
|
/// returns the amount of elements in an array
|
|
template<class T> constexpr int length(T arr[]) {
|
|
return sizeof(arr) / sizeof(T);
|
|
}
|