Tidying
This commit is contained in:
16
src/Helpers/Array.hpp
Normal file
16
src/Helpers/Array.hpp
Normal 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;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user