IceShard
1
A personal game engine project, with development focused on 2D/2.5D games.
Toggle main menu visibility
Loading...
Searching...
No Matches
utils
public
ice
algorithm.hxx
Go to the documentation of this file.
1
3
4
#pragma once
5
#include <algorithm>
6
#include <numeric>
7
8
namespace
ice
9
{
10
11
template
<
typename
T,
typename
U = T>
12
constexpr
auto
accumulate
(
ice::Span<T const>
range, U val)
noexcept
13
{
14
return ::std::accumulate(range.begin(), range.end(), val);
15
}
16
17
}
// namespace ice
ice
SPDX-License-Identifier: MIT.
Definition
array.hxx:12
ice::accumulate
constexpr auto accumulate(ice::Span< T const > range, U val) noexcept
Definition
algorithm.hxx:12
ice::Span
A view into an array of objects laid out in contiguous memory.
Definition
span.hxx:17
Generated by
1.18.0