ClickHouse/base/base/arraySize.h
2021-10-02 10:13:14 +03:00

8 lines
201 B
C++

#pragma once
#include <cstdlib>
/** \brief Returns number of elements in an automatic array. */
template <typename T, std::size_t N>
constexpr size_t arraySize(const T (&)[N]) noexcept { return N; }