std::complex<T>::operator+=,-=,*=,/=
提供: cppreference.com
<tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num ">
</tbody><tbody>
</tbody>
| プライマリテンプレート complex<T> |
||
| (1) | ||
complex& operator+=(const T& other); |
(C++20未満) | |
constexpr complex& operator+=(const T& other); |
(C++20以上) | |
| (2) | ||
complex& operator-=(const T& other); |
(C++20未満) | |
constexpr complex& operator-=(const T& other); |
(C++20以上) | |
| (3) | ||
complex& operator*=(const T& other); |
(C++20未満) | |
constexpr complex& operator*=(const T& other); |
(C++20以上) | |
| (4) | ||
complex& operator/=(const T& other); |
(C++20未満) | |
constexpr complex& operator/=(const T& other); |
(C++20以上) | |
| 特殊化 complex<float> |
||
| (1) | ||
complex& operator+=(float other); |
(C++20未満) | |
constexpr complex& operator+=(float other); |
(C++20以上) | |
| (2) | ||
complex& operator-=(float other); |
(C++20未満) | |
constexpr complex& operator-=(float other); |
(C++20以上) | |
| (3) | ||
complex& operator*=(float other); |
(C++20未満) | |
constexpr complex& operator*=(float other); |
(C++20以上) | |
| (4) | ||
complex& operator/=(float other); |
(C++20未満) | |
constexpr complex& operator/=(float other); |
(C++20以上) | |
| 特殊化 complex<double> |
||
| (1) | ||
complex& operator+=(double other); |
(C++20未満) | |
constexpr complex& operator+=(double other); |
(C++20以上) | |
| (2) | ||
complex& operator-=(double other); |
(C++20未満) | |
constexpr complex& operator-=(double other); |
(C++20以上) | |
| (3) | ||
complex& operator*=(double other); |
(C++20未満) | |
constexpr complex& operator*=(double other); |
(C++20以上) | |
| (4) | ||
complex& operator/=(double other); |
(C++20未満) | |
constexpr complex& operator/=(double other); |
(C++20以上) | |
| 特殊化 complex<long double> |
||
| (1) | ||
complex& operator+=(long double other); |
(C++20未満) | |
constexpr complex& operator+=(long double other); |
(C++20以上) | |
| (2) | ||
complex& operator-=(long double other); |
(C++20未満) | |
constexpr complex& operator-=(long double other); |
(C++20以上) | |
| (3) | ||
complex& operator*=(long double other); |
(C++20未満) | |
constexpr complex& operator*=(long double other); |
(C++20以上) | |
| (4) | ||
complex& operator/=(long double other); |
(C++20未満) | |
constexpr complex& operator/=(long double other); |
(C++20以上) | |
| すべての特殊化 |
||
| (5) | ||
template<class X> complex& operator+=(const std::complex<X>& other); |
(C++20未満) | |
template<class X> constexpr complex& operator+=(const std::complex<X>& other); |
(C++20以上) | |
| (6) | ||
template<class X> complex& operator-=(const std::complex<X>& other); |
(C++20未満) | |
template<class X> constexpr complex& operator-=(const std::complex<X>& other); |
(C++20以上) | |
| (7) | ||
template<class X> complex& operator*=(const std::complex<X>& other); |
(C++20未満) | |
template<class X> constexpr complex& operator*=(const std::complex<X>& other); |
(C++20以上) | |
| (8) | ||
template<class X> complex& operator/=(const std::complex<X>& other); |
(C++20未満) | |
template<class X> constexpr complex& operator/=(const std::complex<X>& other); |
(C++20以上) | |
複素数算術および複素数とスカラーの混合算術のための複合代入演算子を実装します。 スカラーの引数は、その引数に等しい実部とゼロの虚部を持つ複素数として扱われます。
1,5)
*this に other を足します。2,6)
*this から other を引きます。3,7)
*this に other を掛けます。4,8)
*this を other で割ります。引数
| other | - | 複素数または一致する型のスカラー (float, double, long double)
|
戻り値
*this。
関連項目
| 複素数に単項演算子を適用します (関数テンプレート) | |
| 2つの複素数または複素数とスカラーに対して複素数算術を行います (関数テンプレート) |