This commit is contained in:
Nav
2024-12-07 16:48:06 +00:00
parent cbfbd9f4b8
commit 1477719264
4 changed files with 25 additions and 5 deletions

16
src/Helpers/Array.hpp Normal file
View File

@@ -0,0 +1,16 @@
#pragma once
#include <array>
#include <concepts>
#include <cstddef>
class Array
{
public:
template<std::size_t size, std::semiregular ValueType>
static constexpr auto repeat(const ValueType& value) {
auto output = std::array<ValueType, size>{};
output.fill(value);
return output;
}
};