Difference between revisions of "cpp/numeric/complex/operator="
From cppreference.com
m (s/Floating/F) |
m (+trivial link.) |
||
Line 33: | Line 33: | ||
Assigns new values to the contents. | Assigns new values to the contents. | ||
− | @1,2@ Assigns {{lc|real()|cx.real()}} and {{lc|imag()|cx.imag()}} to the real and the imaginary parts of the complex number respectively. {{rev inl|since=c++23|The copy assignment operator {{v|1}} is trivial when {{tt|T}} is a floating-point type.}} | + | @1,2@ Assigns {{lc|real()|cx.real()}} and {{lc|imag()|cx.imag()}} to the real and the imaginary parts of the complex number respectively. {{rev inl|since=c++23|The copy assignment operator {{v|1}} is trivialwhen {{tt|T}} is a floating-point type.}} |
@3@ Assigns {{c|x}} to the real part of the complex number. Imaginary part is set to zero. | @3@ Assigns {{c|x}} to the real part of the complex number. Imaginary part is set to zero. | ||
Line 47: | Line 47: | ||
===Notes=== | ===Notes=== | ||
− | The copy assignment operator is required to be trivial since C++23, but implementations generally make it trivial in all modes. | + | The copy assignment operator is required to be trivialsince C++23, but implementations generally make it trivial in all modes. |
===See also=== | ===See also=== |