std::complex<T>:: operator+=,-=,*=,/=
From ja.cppreference.net
|
プライマリテンプレート
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)
other
を
*
this
に加算します。
2,6)
other
を
*
this
から減算します。
3,7)
other
を乗算して
*
this
を更新します。
4,8)
other
で
*
this
を除算します。
パラメータ
| その他 | - | 一致する型の複素数値またはスカラー値 ( float , double , long double ) |
戻り値
* this
関連項目
|
複素数に単項演算子を適用する
(関数テンプレート) |
|
|
2つの複素数値、または複素数とスカラーの間で複素数演算を実行する
(関数テンプレート) |