MCPcopy Create free account
hub / github.com/bluescarni/mppp / test_constexpr_ipd

Function test_constexpr_ipd

test/complex128_operators.cpp:159–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159static constexpr complex128 test_constexpr_ipd()
160{
161 // complex128.
162 complex128 c{1, 2};
163 c /= complex128{3, 4};
164
165 // complex128 on the left.
166 c /= 1;
167 c /= real128{4};
168#if MPPP_CPLUSPLUS >= 202002L
169 c /= std::complex<float>{1, 2};
170#endif
171
172 // complex128 on the right.
173 int n = 4;
174 n /= complex128{4};
175 real128 r{4};
176 r /= complex128{4};
177#if MPPP_CPLUSPLUS >= 202002L
178 std::complex<double> cd{1, 2};
179 cd /= complex128{4, 5};
180#endif
181
182#if MPPP_CPLUSPLUS >= 202002L
183 // real128 on the left.
184 r /= std::complex<double>{1};
185 // c++ complex on the left.
186 std::complex<double> cd2{4, 5};
187 cd2 /= real128{3};
188#endif
189
190 return complex128{1, 2};
191}
192
193#endif
194

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected