Spec-Zone.ru › C++

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

Основной шаблон 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) Умножает *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/w/cpp/numeric/complex/operator_arith

Spec-Zone.ru

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