Helper functions to convert C-style arrays to std::array of Argon types, mimicking std::to_array.
More...
#include <array>
#include "argon_for.hpp"
Go to the source code of this file.
|
template<class T, std::size_t N, std::size_t... I> |
constexpr std::array< helpers::ArgonFor_t< T >, N > | argon::detail::to_array_impl (T(&a)[N], std::index_sequence< I... >) |
template<class T, std::size_t N, std::size_t... I> |
constexpr std::array< helpers::ArgonFor_t< T >, N > | argon::detail::to_array_impl (T(&&a)[N], std::index_sequence< I... >) |
template<class T, std::size_t N> |
constexpr std::array< helpers::ArgonFor_t< T >, N > | argon::to_array (T(&a)[N]) |
| Convert a C-style array of vector types to a std::array of Argon types.
|
template<class T, std::size_t N> |
constexpr std::array< helpers::ArgonFor_t< T >, N > | argon::to_array (T(&&a)[N]) |
| Convert a C-style array of vector types to a std::array of Argon types.
|
Helper functions to convert C-style arrays to std::array of Argon types, mimicking std::to_array.
◆ to_array() [1/2]
template<class T, std::size_t N>
std::array< helpers::ArgonFor_t< T >, N > argon::to_array |
( |
T(&&) | a[N] | ) |
|
|
constexpr |
Convert a C-style array of vector types to a std::array of Argon types.
- Template Parameters
-
T | The type of the elements in the array. |
N | The number of elements in the array. |
- Parameters
-
a | The C-style array to convert. |
- Returns
- A std::array of Argon types.
This overload is for rvalue references to arrays.
◆ to_array() [2/2]
template<class T, std::size_t N>
std::array< helpers::ArgonFor_t< T >, N > argon::to_array |
( |
T(&) | a[N] | ) |
|
|
constexpr |
Convert a C-style array of vector types to a std::array of Argon types.
- Template Parameters
-
T | The type of the elements in the array. |
N | The number of elements in the array. |
- Parameters
-
a | The C-style array to convert. |
- Returns
- A std::array of Argon types.