retdec
include
retdec
utils
array.h
Go to the documentation of this file.
1
7
#ifndef RETDEC_UTILS_ARRAY_H
8
#define RETDEC_UTILS_ARRAY_H
9
10
#include <cstddef>
11
12
namespace
retdec
{
13
namespace
utils
{
14
25
// The array parameter has no name because we care only about the number of
26
// elements it contains.
27
template
<
typename
T, std::
size_t
N>
28
constexpr std::size_t
arraySize
(T (&)[N]) noexcept {
29
return
N;
30
}
31
32
}
// namespace utils
33
}
// namespace retdec
34
35
#endif
retdec::utils::arraySize
constexpr std::size_t arraySize(T(&)[N]) noexcept
Returns the number of elements of the given array as a compile-time constant.
Definition:
array.h:28
retdec
Definition:
archive_wrapper.h:19
utils
Generated on Tue Aug 8 2023 10:45:49 for retdec by
1.9.1