NestedInitializerList.hpp
Go to the documentation of this file.
1 // This code is based on Jet framework.
2 // Copyright (c) 2018 Doyub Kim
3 // CubbyFlow is voxel-based fluid simulation engine for computer games.
4 // Copyright (c) 2020 CubbyFlow Team
5 // Core Part: Chris Ohk, Junwoo Hwang, Jihong Sin, Seungwoo Yoo
6 // AI Part: Dongheon Cho, Minseo Kim
7 // We are making my contributions/submissions to this project solely in our
8 // personal capacity and are not conveying any rights to any intellectual
9 // property of any third parties.
10 //
11 // This code is adopted from https://github.com/christophercrouzet/m3ta
12 //
13 // The MIT License (MIT)
14 //
15 // Copyright (c) 2015 Christopher Crouzet
16 //
17 // Permission is hereby granted, free of charge, to any person obtaining a copy
18 // of this software and associated documentation files (the "Software"), to deal
19 // in the Software without restriction, including without limitation the rights
20 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
21 // copies of the Software, and to permit persons to whom the Software is
22 // furnished to do so, subject to the following conditions:
23 //
24 // The above copyright notice and this permission notice shall be included in
25 // all copies or substantial portions of the Software.
26 //
27 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33 // SOFTWARE.
34 //
35 
36 #ifndef CUBBYFLOW_NESTED_INITIALIZER_LIST_HPP
37 #define CUBBYFLOW_NESTED_INITIALIZER_LIST_HPP
38 
39 #include <initializer_list>
40 
41 namespace CubbyFlow
42 {
43 template <typename T, size_t N>
45 {
46  using Type =
47  std::initializer_list<typename NestedInitializerLists<T, N - 1>::Type>;
48 };
49 
50 template <typename T>
52 {
53  using Type = T;
54 };
55 
56 template <typename T, size_t N>
58 } // namespace CubbyFlow
59 
60 #endif
T Type
Definition: NestedInitializerList.hpp:53
Definition: pybind11Utils.hpp:20
Definition: NestedInitializerList.hpp:44
typename NestedInitializerLists< T, N >::Type NestedInitializerListsT
Definition: NestedInitializerList.hpp:57
std::initializer_list< typename NestedInitializerLists< T, N - 1 >::Type > Type
Definition: NestedInitializerList.hpp:47