Utility#

namespace stapl
namespace util#

Utility functions.

Functions

template<typename T, size_t N>
std::vector<T> make_vector(std::array<T, N> &&arr)#

Make std::vector from std::array.

Copied from stack overflow.

Template Parameters:
  • T – Type of elements.

  • N – Size of std::array.

Parameters:

arrstd::array to be converted.

Returns:

std::vector with elements from arr.

template<typename T, typename ...U>
auto make_vector(U&&... t)#

Make std::vector from variadic arguments.

Copied from stack overflow. This function is useful when creating std::vector<T> of move-only types.

Template Parameters:
  • T – Type of elements in created std::vector.

  • U – Template parameter pack of varadic arguments.

Parameters:

t – Variadic arguments.

Returns:

std::vector<T> with elements from t.