Embedded Template Library 1.0
Loading...
Searching...
No Matches
largest_type_cpp03.h
1/******************************************************************************
2The MIT License(MIT)
3
4Embedded Template Library.
5https://github.com/ETLCPP/etl
6https://www.etlcpp.com
7
8Copyright(c) 2026 John Wellbelove
9
10Permission is hereby granted, free of charge, to any person obtaining a copy
11of this software and associated documentation files(the "Software"), to deal
12in the Software without restriction, including without limitation the rights
13to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
14copies of the Software, and to permit persons to whom the Software is
15furnished to do so, subject to the following conditions :
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
23AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26SOFTWARE.
27******************************************************************************/
28
29//***************************************************************************
30// THIS FILE HAS BEEN AUTO GENERATED. DO NOT EDIT THIS FILE.
31//***************************************************************************
32
33//***************************************************************************
39//***************************************************************************
40template <typename T1, typename T2 = void, typename T3 = void, typename T4 = void,
41 typename T5 = void, typename T6 = void, typename T7 = void, typename T8 = void,
42 typename T9 = void, typename T10 = void, typename T11 = void, typename T12 = void,
43 typename T13 = void, typename T14 = void, typename T15 = void, typename T16 = void>
45{
46 // Define 'largest_other' as 'largest_type' with all but the first parameter.
47 typedef typename largest_type<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::type largest_other;
48
49 // Set 'type' to be the largest of the first parameter and any of the others.
50 // This is recursive.
51 typedef typename etl::conditional<(sizeof(T1) > sizeof(largest_other)), // Boolean
52 T1, // TrueType
53 largest_other> // FalseType
54 ::type type; // The largest type of the two.
55
56 // The size of the largest type.
57 enum
58 {
59 size = sizeof(type)
60 };
61};
62
63//***************************************************************************
64// Specialisation for one template parameter.
65//***************************************************************************
66template <typename T1>
67struct largest_type<T1, void, void, void, void, void, void, void,
68 void, void, void, void, void, void, void, void>
69{
70 typedef T1 type;
71
72 enum
73 {
74 size = sizeof(type)
75 };
76};
Definition largest_type_cpp03.h:45