OGLplus  (0.59.0) a C++ wrapper for rendering APIs

array_size.hpp
Go to the documentation of this file.
1 
9 #ifndef EAGINE_ARRAY_SIZE_HPP
10 #define EAGINE_ARRAY_SIZE_HPP
11 
12 #include "types.hpp"
13 
14 namespace eagine {
15 
18 template <typename T, std::size_t N>
19 static constexpr auto array_size(const T (&)[N]) noexcept {
20  return span_size(N);
21 }
22 
23 } // namespace eagine
24 
25 #endif // EAGINE_ARRAY_SIZE_HPP
static constexpr auto span_size(T v) noexcept
Converts argument to span size type.
Definition: types.hpp:59
Common code is placed in this namespace.
Definition: eagine.hpp:21
static constexpr auto array_size(const T(&)[N]) noexcept
Returns the number of elements in the array passed as argument.
Definition: array_size.hpp:19

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).