2021-03-05 20:23:23 +00:00
|
|
|
|
|
|
|
#ifndef MAKE_ARRAY_HPP
|
|
|
|
#define MAKE_ARRAY_HPP
|
|
|
|
#include <array>
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
|
|
template<std::size_t N>
|
|
|
|
inline auto make_array(const char (&from_literal)[N]) noexcept
|
|
|
|
{
|
2021-03-19 21:43:00 +00:00
|
|
|
static_assert(N);
|
2021-03-05 20:23:23 +00:00
|
|
|
std::array<char,N-1> a;
|
|
|
|
std::copy(+from_literal, from_literal+a.size(), a.begin());
|
|
|
|
return a;
|
|
|
|
}
|
|
|
|
#endif
|