Namespaces
Variants

std::complex<T>:: operator+=,-=,*=,/=

From cppreference.net
Modèle principal complex<T>
(1)
complex & operator + = ( const T & other ) ;
(jusqu'à C++20)
constexpr complex & operator + = ( const T & other ) ;
(depuis C++20)
(2)
complex & operator - = ( const T & other ) ;
(jusqu'à C++20)
constexpr complex & operator - = ( const T & other ) ;
(depuis C++20)
(3)
complex & operator * = ( const T & other ) ;
(jusqu'à C++20)
constexpr complex & operator * = ( const T & other ) ;
(depuis C++20)
(4)
complex & operator / = ( const T & other ) ;
(jusqu'à C++20)
constexpr complex & operator / = ( const T & other ) ;
(depuis C++20)
Spécialisation complex<float>
(1)
complex & operator + = ( float other ) ;
(jusqu'à C++20)
constexpr complex & operator + = ( float other ) ;
(depuis C++20)
(2)
complex & operator - = ( float other ) ;
(jusqu'à C++20)
constexpr complex & operator - = ( float other ) ;
(depuis C++20)
(3)
complex & operator * = ( float other ) ;
(jusqu'à C++20)
constexpr complex & operator * = ( float other ) ;
(depuis C++20)
(4)
complex & operator / = ( float other ) ;
(jusqu'à C++20)
constexpr complex & operator / = ( float other ) ;
(depuis C++20)
Spécialisation complex<double>
(1)
complex & operator + = ( double other ) ;
(jusqu'à C++20)
constexpr complex & operator + = ( double other ) ;
(depuis C++20)
(2)
complex & operator - = ( double other ) ;
(jusqu'à C++20)
constexpr complex & operator - = ( double other ) ;
(depuis C++20)
(3)
complex & operator * = ( double other ) ;
(jusqu'à C++20)
constexpr complex & operator * = ( double other ) ;
(depuis C++20)
(4)
complex & operator / = ( double other ) ;
(jusqu'à C++20)
constexpr complex & operator / = ( double other ) ;
(depuis C++20)
Spécialisation complex<long double>
(1)
complex & operator + = ( long double other ) ;
(jusqu'à C++20)
constexpr complex & operator + = ( long double other ) ;
(depuis C++20)
(2)
complex & operator - = ( long double other ) ;
(jusqu'à C++20)
constexpr complex & operator - = ( long double other ) ;
(depuis C++20)
(3)
complex & operator * = ( long double other ) ;
(jusqu'à C++20)
constexpr complex & operator * = ( long double other ) ;
(depuis C++20)
(4)
complex & operator / = ( long double other ) ;
(jusqu'à C++20)
constexpr complex & operator / = ( long double other ) ;
(depuis C++20)
Toutes les spécialisations
(5)
template < class X >
complex & operator + = ( const std:: complex < X > & other ) ;
(jusqu'au C++20)
template < class X >
constexpr complex & operator + = ( const std:: complex < X > & other ) ;
(depuis C++20)
(6)
template < class X >
complex & operator - = ( const std:: complex < X > & other ) ;
(jusqu'à C++20)
template < class X >
constexpr complex & operator - = ( const std:: complex < X > & other ) ;
(depuis C++20)
(7)
template < class X >
complex & operator * = ( const std:: complex < X > & other ) ;
(jusqu'au C++20)
template < class X >
constexpr complex & operator * = ( const std:: complex < X > & other ) ;
(depuis C++20)
(8)
template < class X >
complex & operator / = ( const std:: complex < X > & other ) ;
(jusqu'à C++20)
template < class X >
constexpr complex & operator / = ( const std:: complex < X > & other ) ;
(depuis C++20)

Implémente les opérateurs d'affectation composée pour l'arithmétique complexe et pour l'arithmétique mixte complexe/scalaire. Les arguments scalaires sont traités comme des nombres complexes dont la partie réelle est égale à l'argument et la partie imaginaire est fixée à zéro.

1,5) Ajoute other à * this .
2,6) Soustrait other de * this .
3,7) Multiplie * this par other .
4,8) Divise * this par other .

Paramètres

autre - une valeur complexe ou scalaire de type correspondant ( float , double , long double )

Valeur de retour

* this

Voir aussi

applique des opérateurs unaires aux nombres complexes
(modèle de fonction)
effectue des opérations arithmétiques sur deux nombres complexes ou un complexe et un scalaire
(modèle de fonction)