fix: xcode complains about auto return type

This commit is contained in:
Fabien Givors 2023-01-16 20:54:56 +01:00
parent 540294593c
commit dffb0dd29b
1 changed files with 2 additions and 2 deletions

View File

@ -51,14 +51,14 @@ using namespace std;
typedef unsigned char byte_t;
template <typename As, typename T, std::size_t N>
[[nodiscard]] constexpr auto arraySizeAs(const T (&)[N]) noexcept
[[nodiscard]] constexpr As arraySizeAs(const T (&)[N]) noexcept
{
static_assert(N >= 0 && N <= std::numeric_limits<As>::max());
return static_cast<As>(N);
}
template <typename T, std::size_t N>
[[nodiscard]] constexpr auto arraySize(const T (&a)[N]) noexcept
[[nodiscard]] constexpr int arraySize(const T (&a)[N]) noexcept
{
return arraySizeAs<int>(a);
}