14 lines
362 B
C++
14 lines
362 B
C++
#pragma once
|
|||
|
|
|
||
|
|
#include <span>
|
||
|
|
#include <vector>
|
||
|
|
|
||
|
|
namespace cpp20 {
|
||
|
|
|
||
|
|
[[nodiscard]] auto span_sum(std::span<const int> data) -> int;
|
||
|
|
[[nodiscard]] auto first_and_last(std::span<const int> data) -> std::pair<int, int>;
|
||
|
|
[[nodiscard]] auto make_subspan(std::span<const int> data, std::size_t offset, std::size_t count)
|
||
|
|
-> std::vector<int>;
|
||
|
|
|
||
|
|
} // namespace cpp20
|