@@ -1402,14 +1402,14 @@ _NODISCARD _CONSTEXPR20 complex<_Ty> operator+(const complex<_Ty>& _Left, const
1402
1402
template <class _Ty>
1403
1403
_NODISCARD _CONSTEXPR20 complex<_Ty> operator+(const complex<_Ty>& _Left, const _Ty& _Right) {
1404
1404
complex<_Ty> _Tmp(_Left);
1405
- _Tmp.real(_Tmp.real() + _Right) ;
1405
+ _Tmp += _Right;
1406
1406
return _Tmp;
1407
1407
}
1408
1408
1409
1409
template <class _Ty>
1410
1410
_NODISCARD _CONSTEXPR20 complex<_Ty> operator+(const _Ty& _Left, const complex<_Ty>& _Right) {
1411
- complex<_Ty> _Tmp(_Left );
1412
- _Tmp += _Right ;
1411
+ complex<_Ty> _Tmp(_Right );
1412
+ _Tmp += _Left ;
1413
1413
return _Tmp;
1414
1414
}
1415
1415
@@ -1423,7 +1423,7 @@ _NODISCARD _CONSTEXPR20 complex<_Ty> operator-(const complex<_Ty>& _Left, const
1423
1423
template <class _Ty>
1424
1424
_NODISCARD _CONSTEXPR20 complex<_Ty> operator-(const complex<_Ty>& _Left, const _Ty& _Right) {
1425
1425
complex<_Ty> _Tmp(_Left);
1426
- _Tmp.real(_Tmp.real() - _Right) ;
1426
+ _Tmp -= _Right;
1427
1427
return _Tmp;
1428
1428
}
1429
1429
@@ -1444,15 +1444,14 @@ _NODISCARD _CONSTEXPR20 complex<_Ty> operator*(const complex<_Ty>& _Left, const
1444
1444
template <class _Ty>
1445
1445
_NODISCARD _CONSTEXPR20 complex<_Ty> operator*(const complex<_Ty>& _Left, const _Ty& _Right) {
1446
1446
complex<_Ty> _Tmp(_Left);
1447
- _Tmp.real(_Tmp.real() * _Right);
1448
- _Tmp.imag(_Tmp.imag() * _Right);
1447
+ _Tmp *= _Right;
1449
1448
return _Tmp;
1450
1449
}
1451
1450
1452
1451
template <class _Ty>
1453
1452
_NODISCARD _CONSTEXPR20 complex<_Ty> operator*(const _Ty& _Left, const complex<_Ty>& _Right) {
1454
- complex<_Ty> _Tmp(_Left );
1455
- _Tmp *= _Right ;
1453
+ complex<_Ty> _Tmp(_Right );
1454
+ _Tmp *= _Left ;
1456
1455
return _Tmp;
1457
1456
}
1458
1457
@@ -1466,8 +1465,7 @@ _NODISCARD _CONSTEXPR20 complex<_Ty> operator/(const complex<_Ty>& _Left, const
1466
1465
template <class _Ty>
1467
1466
_NODISCARD _CONSTEXPR20 complex<_Ty> operator/(const complex<_Ty>& _Left, const _Ty& _Right) {
1468
1467
complex<_Ty> _Tmp(_Left);
1469
- _Tmp.real(_Tmp.real() / _Right);
1470
- _Tmp.imag(_Tmp.imag() / _Right);
1468
+ _Tmp /= _Right;
1471
1469
return _Tmp;
1472
1470
}
1473
1471
0 commit comments