diff --git a/mfbt/ArrayUtils.h b/mfbt/ArrayUtils.h index 9566a3f40a8a..b572272dd1c7 100644 --- a/mfbt/ArrayUtils.h +++ b/mfbt/ArrayUtils.h @@ -20,6 +20,7 @@ #include "mozilla/Alignment.h" #include "mozilla/Array.h" +#include "mozilla/EnumeratedArray.h" #include "mozilla/TypeTraits.h" namespace mozilla { @@ -64,6 +65,13 @@ ArrayLength(const Array& aArr) return N; } +template +MOZ_CONSTEXPR size_t +ArrayLength(const EnumeratedArray& aArr) +{ + return size_t(N); +} + /* * Compute the address one past the last element of a constant-length array. *