1
/**
2
 * Provides an implicit conversion table for basic types.
3
 *
4
 * Used to determine integer promotions and common types.
5
 *
6
 * Specification: $(LINK2 https://dlang.org/spec/type.html#integer-promotions, Integer Promotions),
7
 *   $(LINK2 https://dlang.org/spec/type.html#usual-arithmetic-conversions, Usual Arithmetic Conversions).
8
 *
9
 * Copyright:   Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved
10
 * Authors:     $(LINK2 http://www.digitalmars.com, Walter Bright)
11
 * License:     $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
12
 * Source:      $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/impcnvtab.d, _impcnvtab.d)
13
 * Documentation:  https://dlang.org/phobos/dmd_impcnvtab.html
14
 * Coverage:    https://codecov.io/gh/dlang/dmd/src/master/src/dmd/impcnvtab.d
15
 */
16

17
module dmd.impcnvtab;
18

19
import dmd.mtype;
20

21
immutable ENUMTY[TMAX][TMAX] impcnvResult = impCnvTab.impcnvResultTab;
22
immutable ENUMTY[TMAX][TMAX] impcnvType1 = impCnvTab.impcnvType1Tab;
23
immutable ENUMTY[TMAX][TMAX] impcnvType2 = impCnvTab.impcnvType2Tab;
24

25
private:
26

27
struct ImpCnvTab
28
{
29
    ENUMTY[TMAX][TMAX] impcnvResultTab;
30
    ENUMTY[TMAX][TMAX] impcnvType1Tab;
31
    ENUMTY[TMAX][TMAX] impcnvType2Tab;
32
}
33

34
enum ImpCnvTab impCnvTab = generateImpCnvTab();
35

36
ImpCnvTab generateImpCnvTab()
37
{
38 5
    ImpCnvTab impCnvTab;
39

40
    // Set conversion tables
41 5
    foreach (i; 0 .. cast(size_t)TMAX)
42
    {
43 5
        foreach (j; 0 .. cast(size_t)TMAX)
44
        {
45 5
            impCnvTab.impcnvResultTab[i][j] = Terror;
46 5
            impCnvTab.impcnvType1Tab[i][j] = Terror;
47 5
            impCnvTab.impcnvType2Tab[i][j] = Terror;
48
        }
49
    }
50

51
    void X(ENUMTY t1, ENUMTY t2, ENUMTY nt1, ENUMTY nt2, ENUMTY rt)
52
    {
53 5
        impCnvTab.impcnvResultTab[t1][t2] = rt;
54 5
        impCnvTab.impcnvType1Tab[t1][t2] = nt1;
55 5
        impCnvTab.impcnvType2Tab[t1][t2] = nt2;
56
    }
57

58
    /* ======================= */
59

60 5
    X(Tbool,Tbool,   Tbool,Tbool,    Tbool);
61 5
    X(Tbool,Tint8,   Tint32,Tint32,  Tint32);
62 5
    X(Tbool,Tuns8,   Tint32,Tint32,  Tint32);
63 5
    X(Tbool,Tint16,  Tint32,Tint32,  Tint32);
64 5
    X(Tbool,Tuns16,  Tint32,Tint32,  Tint32);
65 5
    X(Tbool,Tint32,  Tint32,Tint32,  Tint32);
66 5
    X(Tbool,Tuns32,  Tuns32,Tuns32,  Tuns32);
67 5
    X(Tbool,Tint64,  Tint64,Tint64,  Tint64);
68 5
    X(Tbool,Tuns64,  Tuns64,Tuns64,  Tuns64);
69 5
    X(Tbool,Tint128, Tint128,Tint128, Tint128);
70 5
    X(Tbool,Tuns128, Tuns128,Tuns128, Tuns128);
71

72 5
    X(Tbool,Tfloat32,     Tfloat32,Tfloat32,     Tfloat32);
73 5
    X(Tbool,Tfloat64,     Tfloat64,Tfloat64,     Tfloat64);
74 5
    X(Tbool,Tfloat80,     Tfloat80,Tfloat80,     Tfloat80);
75 5
    X(Tbool,Timaginary32, Tfloat32,Timaginary32, Tfloat32);
76 5
    X(Tbool,Timaginary64, Tfloat64,Timaginary64, Tfloat64);
77 5
    X(Tbool,Timaginary80, Tfloat80,Timaginary80, Tfloat80);
78 5
    X(Tbool,Tcomplex32,   Tfloat32,Tcomplex32,   Tcomplex32);
79 5
    X(Tbool,Tcomplex64,   Tfloat64,Tcomplex64,   Tcomplex64);
80 5
    X(Tbool,Tcomplex80,   Tfloat80,Tcomplex80,   Tcomplex80);
81

82
    /* ======================= */
83

84 5
    X(Tint8,Tint8,   Tint32,Tint32,  Tint32);
85 5
    X(Tint8,Tuns8,   Tint32,Tint32,  Tint32);
86 5
    X(Tint8,Tint16,  Tint32,Tint32,  Tint32);
87 5
    X(Tint8,Tuns16,  Tint32,Tint32,  Tint32);
88 5
    X(Tint8,Tint32,  Tint32,Tint32,  Tint32);
89 5
    X(Tint8,Tuns32,  Tuns32,Tuns32,  Tuns32);
90 5
    X(Tint8,Tint64,  Tint64,Tint64,  Tint64);
91 5
    X(Tint8,Tuns64,  Tuns64,Tuns64,  Tuns64);
92 5
    X(Tint8,Tint128, Tint128,Tint128, Tint128);
93 5
    X(Tint8,Tuns128, Tuns128,Tuns128, Tuns128);
94

95 5
    X(Tint8,Tfloat32,     Tfloat32,Tfloat32,     Tfloat32);
96 5
    X(Tint8,Tfloat64,     Tfloat64,Tfloat64,     Tfloat64);
97 5
    X(Tint8,Tfloat80,     Tfloat80,Tfloat80,     Tfloat80);
98 5
    X(Tint8,Timaginary32, Tfloat32,Timaginary32, Tfloat32);
99 5
    X(Tint8,Timaginary64, Tfloat64,Timaginary64, Tfloat64);
100 5
    X(Tint8,Timaginary80, Tfloat80,Timaginary80, Tfloat80);
101 5
    X(Tint8,Tcomplex32,   Tfloat32,Tcomplex32,   Tcomplex32);
102 5
    X(Tint8,Tcomplex64,   Tfloat64,Tcomplex64,   Tcomplex64);
103 5
    X(Tint8,Tcomplex80,   Tfloat80,Tcomplex80,   Tcomplex80);
104

105
    /* ======================= */
106

107 5
    X(Tuns8,Tuns8,   Tint32,Tint32,  Tint32);
108 5
    X(Tuns8,Tint16,  Tint32,Tint32,  Tint32);
109 5
    X(Tuns8,Tuns16,  Tint32,Tint32,  Tint32);
110 5
    X(Tuns8,Tint32,  Tint32,Tint32,  Tint32);
111 5
    X(Tuns8,Tuns32,  Tuns32,Tuns32,  Tuns32);
112 5
    X(Tuns8,Tint64,  Tint64,Tint64,  Tint64);
113 5
    X(Tuns8,Tuns64,  Tuns64,Tuns64,  Tuns64);
114 5
    X(Tuns8,Tint128,  Tint128,Tint128,  Tint128);
115 5
    X(Tuns8,Tuns128,  Tuns128,Tuns128,  Tuns128);
116

117 5
    X(Tuns8,Tfloat32,     Tfloat32,Tfloat32,     Tfloat32);
118 5
    X(Tuns8,Tfloat64,     Tfloat64,Tfloat64,     Tfloat64);
119 5
    X(Tuns8,Tfloat80,     Tfloat80,Tfloat80,     Tfloat80);
120 5
    X(Tuns8,Timaginary32, Tfloat32,Timaginary32, Tfloat32);
121 5
    X(Tuns8,Timaginary64, Tfloat64,Timaginary64, Tfloat64);
122 5
    X(Tuns8,Timaginary80, Tfloat80,Timaginary80, Tfloat80);
123 5
    X(Tuns8,Tcomplex32,   Tfloat32,Tcomplex32,   Tcomplex32);
124 5
    X(Tuns8,Tcomplex64,   Tfloat64,Tcomplex64,   Tcomplex64);
125 5
    X(Tuns8,Tcomplex80,   Tfloat80,Tcomplex80,   Tcomplex80);
126

127
    /* ======================= */
128

129 5
    X(Tint16,Tint16,  Tint32,Tint32,  Tint32);
130 5
    X(Tint16,Tuns16,  Tint32,Tint32,  Tint32);
131 5
    X(Tint16,Tint32,  Tint32,Tint32,  Tint32);
132 5
    X(Tint16,Tuns32,  Tuns32,Tuns32,  Tuns32);
133 5
    X(Tint16,Tint64,  Tint64,Tint64,  Tint64);
134 5
    X(Tint16,Tuns64,  Tuns64,Tuns64,  Tuns64);
135 5
    X(Tint16,Tint128,  Tint128,Tint128,  Tint128);
136 5
    X(Tint16,Tuns128,  Tuns128,Tuns128,  Tuns128);
137

138 5
    X(Tint16,Tfloat32,     Tfloat32,Tfloat32,     Tfloat32);
139 5
    X(Tint16,Tfloat64,     Tfloat64,Tfloat64,     Tfloat64);
140 5
    X(Tint16,Tfloat80,     Tfloat80,Tfloat80,     Tfloat80);
141 5
    X(Tint16,Timaginary32, Tfloat32,Timaginary32, Tfloat32);
142 5
    X(Tint16,Timaginary64, Tfloat64,Timaginary64, Tfloat64);
143 5
    X(Tint16,Timaginary80, Tfloat80,Timaginary80, Tfloat80);
144 5
    X(Tint16,Tcomplex32,   Tfloat32,Tcomplex32,   Tcomplex32);
145 5
    X(Tint16,Tcomplex64,   Tfloat64,Tcomplex64,   Tcomplex64);
146 5
    X(Tint16,Tcomplex80,   Tfloat80,Tcomplex80,   Tcomplex80);
147

148
    /* ======================= */
149

150 5
    X(Tuns16,Tuns16,  Tint32,Tint32,  Tint32);
151 5
    X(Tuns16,Tint32,  Tint32,Tint32,  Tint32);
152 5
    X(Tuns16,Tuns32,  Tuns32,Tuns32,  Tuns32);
153 5
    X(Tuns16,Tint64,  Tint64,Tint64,  Tint64);
154 5
    X(Tuns16,Tuns64,  Tuns64,Tuns64,  Tuns64);
155 5
    X(Tuns16,Tint128, Tint128,Tint128,  Tint128);
156 5
    X(Tuns16,Tuns128, Tuns128,Tuns128,  Tuns128);
157

158 5
    X(Tuns16,Tfloat32,     Tfloat32,Tfloat32,     Tfloat32);
159 5
    X(Tuns16,Tfloat64,     Tfloat64,Tfloat64,     Tfloat64);
160 5
    X(Tuns16,Tfloat80,     Tfloat80,Tfloat80,     Tfloat80);
161 5
    X(Tuns16,Timaginary32, Tfloat32,Timaginary32, Tfloat32);
162 5
    X(Tuns16,Timaginary64, Tfloat64,Timaginary64, Tfloat64);
163 5
    X(Tuns16,Timaginary80, Tfloat80,Timaginary80, Tfloat80);
164 5
    X(Tuns16,Tcomplex32,   Tfloat32,Tcomplex32,   Tcomplex32);
165 5
    X(Tuns16,Tcomplex64,   Tfloat64,Tcomplex64,   Tcomplex64);
166 5
    X(Tuns16,Tcomplex80,   Tfloat80,Tcomplex80,   Tcomplex80);
167

168
    /* ======================= */
169

170 5
    X(Tint32,Tint32,  Tint32,Tint32,  Tint32);
171 5
    X(Tint32,Tuns32,  Tuns32,Tuns32,  Tuns32);
172 5
    X(Tint32,Tint64,  Tint64,Tint64,  Tint64);
173 5
    X(Tint32,Tuns64,  Tuns64,Tuns64,  Tuns64);
174 5
    X(Tint32,Tint128, Tint128,Tint128,  Tint128);
175 5
    X(Tint32,Tuns128, Tuns128,Tuns128,  Tuns128);
176

177 5
    X(Tint32,Tfloat32,     Tfloat32,Tfloat32,     Tfloat32);
178 5
    X(Tint32,Tfloat64,     Tfloat64,Tfloat64,     Tfloat64);
179 5
    X(Tint32,Tfloat80,     Tfloat80,Tfloat80,     Tfloat80);
180 5
    X(Tint32,Timaginary32, Tfloat32,Timaginary32, Tfloat32);
181 5
    X(Tint32,Timaginary64, Tfloat64,Timaginary64, Tfloat64);
182 5
    X(Tint32,Timaginary80, Tfloat80,Timaginary80, Tfloat80);
183 5
    X(Tint32,Tcomplex32,   Tfloat32,Tcomplex32,   Tcomplex32);
184 5
    X(Tint32,Tcomplex64,   Tfloat64,Tcomplex64,   Tcomplex64);
185 5
    X(Tint32,Tcomplex80,   Tfloat80,Tcomplex80,   Tcomplex80);
186

187
    /* ======================= */
188

189 5
    X(Tuns32,Tuns32,  Tuns32,Tuns32,  Tuns32);
190 5
    X(Tuns32,Tint64,  Tint64,Tint64,  Tint64);
191 5
    X(Tuns32,Tuns64,  Tuns64,Tuns64,  Tuns64);
192 5
    X(Tuns32,Tint128,  Tint128,Tint128,  Tint128);
193 5
    X(Tuns32,Tuns128,  Tuns128,Tuns128,  Tuns128);
194

195 5
    X(Tuns32,Tfloat32,     Tfloat32,Tfloat32,     Tfloat32);
196 5
    X(Tuns32,Tfloat64,     Tfloat64,Tfloat64,     Tfloat64);
197 5
    X(Tuns32,Tfloat80,     Tfloat80,Tfloat80,     Tfloat80);
198 5
    X(Tuns32,Timaginary32, Tfloat32,Timaginary32, Tfloat32);
199 5
    X(Tuns32,Timaginary64, Tfloat64,Timaginary64, Tfloat64);
200 5
    X(Tuns32,Timaginary80, Tfloat80,Timaginary80, Tfloat80);
201 5
    X(Tuns32,Tcomplex32,   Tfloat32,Tcomplex32,   Tcomplex32);
202 5
    X(Tuns32,Tcomplex64,   Tfloat64,Tcomplex64,   Tcomplex64);
203 5
    X(Tuns32,Tcomplex80,   Tfloat80,Tcomplex80,   Tcomplex80);
204

205
    /* ======================= */
206

207 5
    X(Tint64,Tint64,  Tint64,Tint64,  Tint64);
208 5
    X(Tint64,Tuns64,  Tuns64,Tuns64,  Tuns64);
209 5
    X(Tint64,Tint128,  Tint128,Tint128,  Tint128);
210 5
    X(Tint64,Tuns128,  Tuns128,Tuns128,  Tuns128);
211

212 5
    X(Tint64,Tfloat32,     Tfloat32,Tfloat32,     Tfloat32);
213 5
    X(Tint64,Tfloat64,     Tfloat64,Tfloat64,     Tfloat64);
214 5
    X(Tint64,Tfloat80,     Tfloat80,Tfloat80,     Tfloat80);
215 5
    X(Tint64,Timaginary32, Tfloat32,Timaginary32, Tfloat32);
216 5
    X(Tint64,Timaginary64, Tfloat64,Timaginary64, Tfloat64);
217 5
    X(Tint64,Timaginary80, Tfloat80,Timaginary80, Tfloat80);
218 5
    X(Tint64,Tcomplex32,   Tfloat32,Tcomplex32,   Tcomplex32);
219 5
    X(Tint64,Tcomplex64,   Tfloat64,Tcomplex64,   Tcomplex64);
220 5
    X(Tint64,Tcomplex80,   Tfloat80,Tcomplex80,   Tcomplex80);
221

222
    /* ======================= */
223

224 5
    X(Tuns64,Tuns64,  Tuns64,Tuns64,  Tuns64);
225 5
    X(Tuns64,Tint128,  Tint128,Tint128,  Tint128);
226 5
    X(Tuns64,Tuns128,  Tuns128,Tuns128,  Tuns128);
227

228 5
    X(Tuns64,Tfloat32,     Tfloat32,Tfloat32,     Tfloat32);
229 5
    X(Tuns64,Tfloat64,     Tfloat64,Tfloat64,     Tfloat64);
230 5
    X(Tuns64,Tfloat80,     Tfloat80,Tfloat80,     Tfloat80);
231 5
    X(Tuns64,Timaginary32, Tfloat32,Timaginary32, Tfloat32);
232 5
    X(Tuns64,Timaginary64, Tfloat64,Timaginary64, Tfloat64);
233 5
    X(Tuns64,Timaginary80, Tfloat80,Timaginary80, Tfloat80);
234 5
    X(Tuns64,Tcomplex32,   Tfloat32,Tcomplex32,   Tcomplex32);
235 5
    X(Tuns64,Tcomplex64,   Tfloat64,Tcomplex64,   Tcomplex64);
236 5
    X(Tuns64,Tcomplex80,   Tfloat80,Tcomplex80,   Tcomplex80);
237

238
    /* ======================= */
239

240 5
    X(Tint128,Tint128,  Tint128,Tint128,  Tint128);
241 5
    X(Tint128,Tuns128,  Tuns128,Tuns128,  Tuns128);
242

243 5
    X(Tint128,Tfloat32,     Tfloat32,Tfloat32,     Tfloat32);
244 5
    X(Tint128,Tfloat64,     Tfloat64,Tfloat64,     Tfloat64);
245 5
    X(Tint128,Tfloat80,     Tfloat80,Tfloat80,     Tfloat80);
246 5
    X(Tint128,Timaginary32, Tfloat32,Timaginary32, Tfloat32);
247 5
    X(Tint128,Timaginary64, Tfloat64,Timaginary64, Tfloat64);
248 5
    X(Tint128,Timaginary80, Tfloat80,Timaginary80, Tfloat80);
249 5
    X(Tint128,Tcomplex32,   Tfloat32,Tcomplex32,   Tcomplex32);
250 5
    X(Tint128,Tcomplex64,   Tfloat64,Tcomplex64,   Tcomplex64);
251 5
    X(Tint128,Tcomplex80,   Tfloat80,Tcomplex80,   Tcomplex80);
252

253
    /* ======================= */
254

255 5
    X(Tuns128,Tuns128,  Tuns128,Tuns128,  Tuns128);
256

257 5
    X(Tuns128,Tfloat32,     Tfloat32,Tfloat32,     Tfloat32);
258 5
    X(Tuns128,Tfloat64,     Tfloat64,Tfloat64,     Tfloat64);
259 5
    X(Tuns128,Tfloat80,     Tfloat80,Tfloat80,     Tfloat80);
260 5
    X(Tuns128,Timaginary32, Tfloat32,Timaginary32, Tfloat32);
261 5
    X(Tuns128,Timaginary64, Tfloat64,Timaginary64, Tfloat64);
262 5
    X(Tuns128,Timaginary80, Tfloat80,Timaginary80, Tfloat80);
263 5
    X(Tuns128,Tcomplex32,   Tfloat32,Tcomplex32,   Tcomplex32);
264 5
    X(Tuns128,Tcomplex64,   Tfloat64,Tcomplex64,   Tcomplex64);
265 5
    X(Tuns128,Tcomplex80,   Tfloat80,Tcomplex80,   Tcomplex80);
266

267
    /* ======================= */
268

269 5
    X(Tfloat32,Tfloat32,  Tfloat32,Tfloat32, Tfloat32);
270 5
    X(Tfloat32,Tfloat64,  Tfloat64,Tfloat64, Tfloat64);
271 5
    X(Tfloat32,Tfloat80,  Tfloat80,Tfloat80, Tfloat80);
272

273 5
    X(Tfloat32,Timaginary32,  Tfloat32,Timaginary32, Tfloat32);
274 5
    X(Tfloat32,Timaginary64,  Tfloat64,Timaginary64, Tfloat64);
275 5
    X(Tfloat32,Timaginary80,  Tfloat80,Timaginary80, Tfloat80);
276

277 5
    X(Tfloat32,Tcomplex32,  Tfloat32,Tcomplex32, Tcomplex32);
278 5
    X(Tfloat32,Tcomplex64,  Tfloat64,Tcomplex64, Tcomplex64);
279 5
    X(Tfloat32,Tcomplex80,  Tfloat80,Tcomplex80, Tcomplex80);
280

281
    /* ======================= */
282

283 5
    X(Tfloat64,Tfloat64,  Tfloat64,Tfloat64, Tfloat64);
284 5
    X(Tfloat64,Tfloat80,  Tfloat80,Tfloat80, Tfloat80);
285

286 5
    X(Tfloat64,Timaginary32,  Tfloat64,Timaginary64, Tfloat64);
287 5
    X(Tfloat64,Timaginary64,  Tfloat64,Timaginary64, Tfloat64);
288 5
    X(Tfloat64,Timaginary80,  Tfloat80,Timaginary80, Tfloat80);
289

290 5
    X(Tfloat64,Tcomplex32,  Tfloat64,Tcomplex64, Tcomplex64);
291 5
    X(Tfloat64,Tcomplex64,  Tfloat64,Tcomplex64, Tcomplex64);
292 5
    X(Tfloat64,Tcomplex80,  Tfloat80,Tcomplex80, Tcomplex80);
293

294
    /* ======================= */
295

296 5
    X(Tfloat80,Tfloat80,  Tfloat80,Tfloat80, Tfloat80);
297

298 5
    X(Tfloat80,Timaginary32,  Tfloat80,Timaginary80, Tfloat80);
299 5
    X(Tfloat80,Timaginary64,  Tfloat80,Timaginary80, Tfloat80);
300 5
    X(Tfloat80,Timaginary80,  Tfloat80,Timaginary80, Tfloat80);
301

302 5
    X(Tfloat80,Tcomplex32,  Tfloat80,Tcomplex80, Tcomplex80);
303 5
    X(Tfloat80,Tcomplex64,  Tfloat80,Tcomplex80, Tcomplex80);
304 5
    X(Tfloat80,Tcomplex80,  Tfloat80,Tcomplex80, Tcomplex80);
305

306
    /* ======================= */
307

308 5
    X(Timaginary32,Timaginary32,  Timaginary32,Timaginary32, Timaginary32);
309 5
    X(Timaginary32,Timaginary64,  Timaginary64,Timaginary64, Timaginary64);
310 5
    X(Timaginary32,Timaginary80,  Timaginary80,Timaginary80, Timaginary80);
311

312 5
    X(Timaginary32,Tcomplex32,  Timaginary32,Tcomplex32, Tcomplex32);
313 5
    X(Timaginary32,Tcomplex64,  Timaginary64,Tcomplex64, Tcomplex64);
314 5
    X(Timaginary32,Tcomplex80,  Timaginary80,Tcomplex80, Tcomplex80);
315

316
    /* ======================= */
317

318 5
    X(Timaginary64,Timaginary64,  Timaginary64,Timaginary64, Timaginary64);
319 5
    X(Timaginary64,Timaginary80,  Timaginary80,Timaginary80, Timaginary80);
320

321 5
    X(Timaginary64,Tcomplex32,  Timaginary64,Tcomplex64, Tcomplex64);
322 5
    X(Timaginary64,Tcomplex64,  Timaginary64,Tcomplex64, Tcomplex64);
323 5
    X(Timaginary64,Tcomplex80,  Timaginary80,Tcomplex80, Tcomplex80);
324

325
    /* ======================= */
326

327 5
    X(Timaginary80,Timaginary80,  Timaginary80,Timaginary80, Timaginary80);
328

329 5
    X(Timaginary80,Tcomplex32,  Timaginary80,Tcomplex80, Tcomplex80);
330 5
    X(Timaginary80,Tcomplex64,  Timaginary80,Tcomplex80, Tcomplex80);
331 5
    X(Timaginary80,Tcomplex80,  Timaginary80,Tcomplex80, Tcomplex80);
332

333
    /* ======================= */
334

335 5
    X(Tcomplex32,Tcomplex32,  Tcomplex32,Tcomplex32, Tcomplex32);
336 5
    X(Tcomplex32,Tcomplex64,  Tcomplex64,Tcomplex64, Tcomplex64);
337 5
    X(Tcomplex32,Tcomplex80,  Tcomplex80,Tcomplex80, Tcomplex80);
338

339
    /* ======================= */
340

341 5
    X(Tcomplex64,Tcomplex64,  Tcomplex64,Tcomplex64, Tcomplex64);
342 5
    X(Tcomplex64,Tcomplex80,  Tcomplex80,Tcomplex80, Tcomplex80);
343

344
    /* ======================= */
345

346 5
    X(Tcomplex80,Tcomplex80,  Tcomplex80,Tcomplex80, Tcomplex80);
347

348 5
    foreach (i; 0 .. cast(size_t)TMAX)
349
    {
350 5
        foreach (j; 0 .. cast(size_t)TMAX)
351
        {
352 5
            if (impCnvTab.impcnvResultTab[i][j] == Terror)
353
            {
354 5
                impCnvTab.impcnvResultTab[i][j] = impCnvTab.impcnvResultTab[j][i];
355 5
                impCnvTab.impcnvType1Tab[i][j] = impCnvTab.impcnvType2Tab[j][i];
356 5
                impCnvTab.impcnvType2Tab[i][j] = impCnvTab.impcnvType1Tab[j][i];
357
            }
358
        }
359
    }
360

361 5
    return impCnvTab;
362
}

Read our documentation on viewing source code .

Loading