tmp/tmpzjgz4a85/{from.md → to.md}
RENAMED
|
@@ -1,35 +1,34 @@
|
|
| 1 |
### Class template `complex` <a id="complex">[[complex]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
-
template<class T>
|
| 6 |
-
class complex {
|
| 7 |
public:
|
| 8 |
using value_type = T;
|
| 9 |
|
| 10 |
constexpr complex(const T& re = T(), const T& im = T());
|
| 11 |
constexpr complex(const complex&);
|
| 12 |
template<class X> constexpr complex(const complex<X>&);
|
| 13 |
|
| 14 |
constexpr T real() const;
|
| 15 |
-
void real(T);
|
| 16 |
constexpr T imag() const;
|
| 17 |
-
void imag(T);
|
| 18 |
|
| 19 |
-
complex
|
| 20 |
-
complex
|
| 21 |
-
complex
|
| 22 |
-
complex
|
| 23 |
-
complex
|
| 24 |
|
| 25 |
-
complex& operator=(const complex&);
|
| 26 |
-
template<class X> complex
|
| 27 |
-
template<class X> complex
|
| 28 |
-
template<class X> complex
|
| 29 |
-
template<class X> complex
|
| 30 |
-
template<class X> complex
|
| 31 |
};
|
| 32 |
}
|
| 33 |
```
|
| 34 |
|
| 35 |
The class `complex` describes an object that can store the Cartesian
|
|
|
|
| 1 |
### Class template `complex` <a id="complex">[[complex]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
+
template<class T> class complex {
|
|
|
|
| 6 |
public:
|
| 7 |
using value_type = T;
|
| 8 |
|
| 9 |
constexpr complex(const T& re = T(), const T& im = T());
|
| 10 |
constexpr complex(const complex&);
|
| 11 |
template<class X> constexpr complex(const complex<X>&);
|
| 12 |
|
| 13 |
constexpr T real() const;
|
| 14 |
+
constexpr void real(T);
|
| 15 |
constexpr T imag() const;
|
| 16 |
+
constexpr void imag(T);
|
| 17 |
|
| 18 |
+
constexpr complex& operator= (const T&);
|
| 19 |
+
constexpr complex& operator+=(const T&);
|
| 20 |
+
constexpr complex& operator-=(const T&);
|
| 21 |
+
constexpr complex& operator*=(const T&);
|
| 22 |
+
constexpr complex& operator/=(const T&);
|
| 23 |
|
| 24 |
+
constexpr complex& operator=(const complex&);
|
| 25 |
+
template<class X> constexpr complex& operator= (const complex<X>&);
|
| 26 |
+
template<class X> constexpr complex& operator+=(const complex<X>&);
|
| 27 |
+
template<class X> constexpr complex& operator-=(const complex<X>&);
|
| 28 |
+
template<class X> constexpr complex& operator*=(const complex<X>&);
|
| 29 |
+
template<class X> constexpr complex& operator/=(const complex<X>&);
|
| 30 |
};
|
| 31 |
}
|
| 32 |
```
|
| 33 |
|
| 34 |
The class `complex` describes an object that can store the Cartesian
|