Functions
MakeArray.hpp File Reference

Defines function make_array. More...

#include <array>
#include <cstddef>
#include <iterator>
#include <utility>
#include "Utilities/ForceInline.hpp"
#include "Utilities/Requires.hpp"
#include "Utilities/TMPL.hpp"
#include "Utilities/TypeTraits.hpp"

Go to the source code of this file.

Functions

template<size_t Size, typename T , typename... Args>
constexpr std::array< T, Size > make_array (Args &&... args) noexcept(noexcept(MakeArray_detail::MakeArray< Size==0 >::template apply< T >(std::make_index_sequence<(Size==0 ? Size :Size - 1)>{}, std::forward< Args >(args)...)))
 Create a std::array<T, Size>{{T(args...), T(args...), ...}} More...
 
template<size_t Size, typename T >
constexpr auto make_array (T &&t) noexcept(noexcept(MakeArray_detail::MakeArray< Size==0 >::template apply< std::decay_t< T >>(std::make_index_sequence<(Size==0 ? Size :Size - 1)>{}, std::forward< T >(t)))) -> std::array< std::decay_t< T >, Size >
 Create a std::array<std::decay_t<T>, Size>{{t, t, ...}} More...
 
template<typename T , typename... V, Requires<(sizeof...(V) > 0>
constexpr auto make_array (T &&t, V &&... values) noexcept(noexcept(std::array< std::decay_t< T >, sizeof...(V)+1 >{ {std::forward< T >(t), std::forward< V >(values)...}})) -> std::array< typename std::decay_t< T >, sizeof...(V)+1 >
 Helper function to initialize a std::array with varying number of arguments.
 
template<typename T , size_t size, typename Seq >
constexpr std::array< T, size > make_array (Seq &&seq) noexcept(noexcept(MakeArray_detail::make_array_from_iterator_impl< T, size >(std::forward< Seq >(seq), std::make_index_sequence< size >{})))
 Create an std::array<T, size> from the first size values of seq More...
 

Detailed Description

Defines function make_array.