GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
make_array.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_MAKE_ARRAY_H_
9#define DESIGNLAB_MAKE_ARRAY_H_
10
11#include <array>
12
14
21template <typename T, typename... Args>
22constexpr std::array<T, sizeof...(Args)> make_array(Args&&... args) {
23 return std::array<T, sizeof...(Args)>{static_cast<Args&&>(args)...};
24}
25
26} // namespace designlab::nostd
27
28#endif // DESIGNLAB_MAKE_ARRAY_H_
constexpr std::array< T, sizeof...(Args)> make_array(Args &&... args)
std::arrayを作成する関数. この関数を作成したモチベーションとしては, std::arrayを constexprで初期化する際に苦戦したため. この関数を使うことで,...
Definition make_array.h:22