28template<
typename T, std::size_t... Is>
29constexpr std::array<T,
sizeof...(Is)>
create_array(
const T& value, std::index_sequence<Is...> )
32 return { { (
static_cast<void>(Is), value)... } };
40template<std::
size_t N,
typename T>
41constexpr std::array<T, N> create_array(
const T& value)
43 return detail::create_array(value, std::make_index_sequence<N>());
50template<
size_t N,
typename Scalar>
51constexpr std::array<Scalar, N>
genRangeArray(Scalar start, Scalar stepSize, [[maybe_unused]] Scalar end)
53 std::array<Scalar, N> container{};
55 for (
size_t i = 0; i < container.size(); i++)
57 container.at(i) = start;
constexpr std::array< T, sizeof...(Is)> create_array(const T &value, std::index_sequence< Is... >)
Create an array with the value assigned to all elements in the container.
Definition Array.hpp:29
constexpr std::array< Scalar, N > genRangeArray(Scalar start, Scalar stepSize, Scalar end)
Returns a container filled with the given range.
Definition Array.hpp:51
#define INS_ASSERT_USER_ERROR(_EXP, _MSG)
Assert function with message.
Definition Assert.h:21