GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
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
14namespace designlab
15{
16
22template<typename T, typename ...Args>
23constexpr 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_
constexpr std::array< T, sizeof...(Args)> MakeArray(Args &&... args)
std::arrayを作成する関数. この関数を作成したモチベーションとしては, std::arrayを constexprで初期化する際に苦戦したため. この関数を使うことで,std::arr...
Definition array_util.h:23