ClickHouse/base/common/arraySize.h
2021-06-16 23:28:41 +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; }