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

eagine/array_size.cpp

Copyright Matus Chochlik. Distributed under the Boost Software License, Version 1.0. See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt

#include <iostream>
auto main() -> int {
using namespace eagine;
const char* strings[] = {"foo", "bar", "baz", "qux"};
for(span_size_t i = 0; i < array_size(strings); ++i) {
std::cout << i << '|' << strings[i] << std::endl;
}
return 0;
}
std::ptrdiff_t span_size_t
Signed span size type used by eagine.
Definition: types.hpp:36
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).