GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
DesignLab
array_util.h
[詳解]
1
3
4
// Copyright(c) 2023-2025 Design Engineering Laboratory, Saitama University
5
// Released under the MIT license
6
// https://opensource.org/licenses/mit-license.php
7
8
#ifndef DESIGNLAB_ARRAY_UTIL_H_
9
#define DESIGNLAB_ARRAY_UTIL_H_
10
11
#include <array>
12
13
14
namespace
designlab
15
{
16
22
template
<
typename
T,
typename
...Args>
23
constexpr
std::array<T,
sizeof
...(Args)>
MakeArray
(Args&&... args)
24
{
25
return
std::array<T,
sizeof
...(Args)>{
static_cast<
Args&&
>
(args)... };
26
}
27
28
}
// namespace designlab
29
30
31
#endif
// DESIGNLAB_ARRAY_UTIL_H_
designlab
Definition
abstract_dxlib_gui.cpp:18
designlab::MakeArray
constexpr std::array< T, sizeof...(Args)> MakeArray(Args &&... args)
std::arrayを作成する関数. この関数を作成したモチベーションとしては, std::arrayを constexprで初期化する際に苦戦したため. この関数を使うことで,std::arr...
Definition
array_util.h:23
構築:
1.9.8