Spec-Zone.ru › C++

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

Основной шаблон complex<T>
complex& operator+=( const T& other );
(1) (до C++20)
constexpr complex& operator+=( const T& other );
(начиная с C++20)
complex& operator-=( const T& other );
(2) (до C++20)
constexpr complex& operator-=( const T& other );
(начиная с C++20)
complex& operator*=( const T& other );
(3) (до C++20)
constexpr complex& operator*=( const T& other );
(начиная с C++20)
complex& operator/=( const T& other );
(4) (до C++20)
constexpr complex& operator/=( const T& other );
(начиная с C++20)
Специализация complex<float>
complex& operator+=( float other );
(1) (до C++20)
constexpr complex& operator+=( float other );
(начиная с C++20)
complex& operator-=( float other );
(2) (до C++20)
constexpr complex& operator-=( float other );
(начиная с C++20)
complex& operator*=( float other );
(3) (до C++20)
constexpr complex& operator*=( float other );
(начиная с C++20)
complex& operator/=( float other );
(4) (до C++20)
constexpr complex& operator/=( float other );
(начиная с C++20)
Специализация complex<double>
complex& operator+=( double other );
(1) (до C++20)
constexpr complex& operator+=( double other );
(начиная с C++20)
complex& operator-=( double other );
(2) (до C++20)
constexpr complex& operator-=( double other );
(начиная с C++20)
complex& operator*=( double other );
(3) (до C++20)
constexpr complex& operator*=( double other );
(начиная с C++20)
complex& operator/=( double other );
(4) (до C++20)
constexpr complex& operator/=( double other );
(начиная с C++20)
Специализация complex<long double>
complex& operator+=( long double other );
(1) (до C++20)
constexpr complex& operator+=( long double other );
(начиная с C++20)
complex& operator-=( long double other );
(2) (до C++20)
constexpr complex& operator-=( long double other );
(начиная с C++20)
complex& operator*=( long double other );
(3) (до C++20)
constexpr complex& operator*=( long double other );
(начиная с C++20)
complex& operator/=( long double other );
(4) (до C++20)
constexpr complex& operator/=( long double other );
(начиная с C++20)
Все специализации
template<class X>
complex& operator+=( const std::complex<X>& other );
(5) (до C++20)
template<class X>
constexpr complex& operator+=( const std::complex<X>& other );
(начиная с C++20)
template<class X>
complex& operator-=( const std::complex<X>& other );
(6) (до C++20)
template<class X>
constexpr complex& operator-=( const std::complex<X>& other );
(начиная с C++20)
template<class X>
complex& operator*=( const std::complex<X>& other );
(7) (до C++20)
template<class X>
constexpr complex& operator*=( const std::complex<X>& other );
(начиная с C++20)
template<class X>
complex& operator/=( const std::complex<X>& other );
(8) (до 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) Умножает *this на other.
4,8) Делит *this на other.

Параметры

other - комплексное число или скалярное значение соответствующего типа (float, double, long double)

Возвращаемое значение

*this

См. также

operator+operator-
применяет унарные операторы к комплексным числам
(шаблон функции)
operator+operator-operator*operator/
выполняет арифметические операции с комплексными числами для двух комплексных значений либо комплексного числа и скаляра
(шаблон функции)

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/numeric/complex/operator_arith

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API