KUMI v5.0.0
Gorgeous Garnet
Loading...
Searching...
No Matches

Creates a array object, deducing the target type from the types of arguments. More...

Variables

constexpr make_array_t kumi::make_array {}

Detailed Description

Creates a array object, deducing the target type from the types of arguments.

Variable Documentation

◆ make_array

make_array_t kumi::make_array {}
inlineconstexprnodiscard

Header file

#include <kumi/kumi.hpp>

Call Signature

namespace kumi
{
template<typename... Ts>
constexpr auto make_array(Ts&&... ts);
}
constexpr make_array_t make_array
Definition array.hpp:455
Main KUMI namespace.
Definition algorithm.hpp:11

Parameters

  • ts: Zero or more arguments to construct the array from.

Return value

  • A kumi::array constructed from the arguments or their inner references when an argument is an instance of std::reference_wrapper.

Example

#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
// The element type is deduced from the (identical) types of the arguments.
auto a = kumi::make_array( 1, 2, 3, 4 );
std::cout << a << "\n";
}