SyTen

◆ insertDummy() [3/4]

template<typename Type , std::size_t rank>
std::array< Type, rank+1 > syten::insertDummy ( std::array< Type, rank > const &  a,
std::size_t  position,
typename IdentityType< Type >::type  val 
)

Copies a with val at 1-indexed position position.

Parameters
ainput array
positionplace at which to insert the new value
valnew value
Returns
an array with the new value at the specified 1-indexed position

[2, 3, 4, 5], 2, 15 → [2, 15, 3, 4, 5]

References rank(), and SYTEN_ASSERT_DEBUG.

+ Here is the call graph for this function: