File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 33#include < string>
44
55#include " common/logging.h"
6- #include " common/utils.h"
76#include " core/config_bridge.h"
87#include " core/context.h"
98
1514
1615namespace vector ::native::jni {
1716
17+ /* *
18+ * @brief Returns the number of elements in a statically-allocated C-style array.
19+ *
20+ * This is a compile-time constant.
21+ * Attempting to use this on a pointer will result in a compilation error,
22+ * preventing common mistakes.
23+ *
24+ * @tparam T The type of the array elements.
25+ * @tparam N The size of the array.
26+ * @param arr A reference to the array.
27+ * @return The number of elements in the array.
28+ */
29+ template <typename T, size_t N>
30+ [[nodiscard]] constexpr inline size_t ArraySize (T (&)[N]) {
31+ return N;
32+ }
33+
1834/* *
1935 * @brief A helper function to get the obfuscated native bridge class signature prefix.
2036 *
You can’t perform that action at this time.
0 commit comments