ClickHouse/base/common/arraySize.h

8 lines
201 B
C++
Raw Normal View History

2021-06-15 19:55:21 +00:00
#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; }