]>
Commit | Line | Data |
---|---|---|
a024740d | 1 | // { dg-do compile } |
8468bfe8 | 2 | // { dg-require-normal-namespace "" } |
a024740d | 3 | |
85ec4feb | 4 | // Copyright (C) 2007-2018 Free Software Foundation, Inc. |
a024740d BK |
5 | // |
6 | // This file is part of the GNU ISO C++ Library. This library is free | |
7 | // software; you can redistribute it and/or modify it under the | |
8 | // terms of the GNU General Public License as published by the | |
748086b7 | 9 | // Free Software Foundation; either version 3, or (at your option) |
a024740d BK |
10 | // any later version. |
11 | ||
12 | // This library is distributed in the hope that it will be useful, | |
13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | // GNU General Public License for more details. | |
16 | ||
17 | // You should have received a copy of the GNU General Public License along | |
748086b7 JJ |
18 | // with this library; see the file COPYING3. If not see |
19 | // <http://www.gnu.org/licenses/>. | |
a024740d BK |
20 | |
21 | #include <complex> | |
22 | ||
23 | namespace std { | |
24 | template<class T> class complex; | |
25 | template<> class complex<float>; | |
26 | template<> class complex<double>; | |
27 | template<> class complex<long double>; | |
28 | ||
29 | // 26.2.6 operators: | |
30 | template<class T> | |
31 | complex<T> operator+(const complex<T>&, const complex<T>&); | |
32 | template<class T> complex<T> operator+(const complex<T>&, const T&); | |
33 | template<class T> complex<T> operator+(const T&, const complex<T>&); | |
34 | template<class T> complex<T> operator- | |
35 | (const complex<T>&, const complex<T>&); | |
36 | template<class T> complex<T> operator-(const complex<T>&, const T&); | |
37 | template<class T> complex<T> operator-(const T&, const complex<T>&); | |
38 | template<class T> complex<T> operator* | |
39 | (const complex<T>&, const complex<T>&); | |
40 | template<class T> complex<T> operator*(const complex<T>&, const T&); | |
41 | template<class T> complex<T> operator*(const T&, const complex<T>&); | |
42 | template<class T> complex<T> operator/ | |
43 | (const complex<T>&, const complex<T>&); | |
44 | template<class T> complex<T> operator/(const complex<T>&, const T&); | |
45 | template<class T> complex<T> operator/(const T&, const complex<T>&); | |
46 | template<class T> complex<T> operator+(const complex<T>&); | |
47 | template<class T> complex<T> operator-(const complex<T>&); | |
6f20ac34 | 48 | template<class T> _GLIBCXX_CONSTEXPR bool operator== |
a024740d | 49 | (const complex<T>&, const complex<T>&); |
6f20ac34 JW |
50 | template<class T> _GLIBCXX_CONSTEXPR bool operator== |
51 | (const complex<T>&, const T&); | |
52 | template<class T> _GLIBCXX_CONSTEXPR bool operator== | |
53 | (const T&, const complex<T>&); | |
a024740d BK |
54 | |
55 | ||
6f20ac34 JW |
56 | template<class T> _GLIBCXX_CONSTEXPR bool operator!= |
57 | (const complex<T>&, const complex<T>&); | |
58 | template<class T> _GLIBCXX_CONSTEXPR bool operator!= | |
59 | (const complex<T>&, const T&); | |
60 | template<class T> _GLIBCXX_CONSTEXPR bool operator!= | |
61 | (const T&, const complex<T>&); | |
a024740d BK |
62 | template<class T, class charT, class traits> |
63 | basic_istream<charT, traits>& | |
64 | operator>>(basic_istream<charT, traits>&, complex<T>&); | |
65 | template<class T, class charT, class traits> | |
66 | basic_ostream<charT, traits>& | |
67 | operator<<(basic_ostream<charT, traits>&, const complex<T>&); | |
68 | ||
69 | // 26.2.7 values: | |
6f20ac34 JW |
70 | template<class T> _GLIBCXX_CONSTEXPR T real(const complex<T>&); |
71 | template<class T> _GLIBCXX_CONSTEXPR T imag(const complex<T>&); | |
a024740d BK |
72 | template<class T> T abs(const complex<T>&); |
73 | template<class T> T arg(const complex<T>&); | |
74 | template<class T> T norm(const complex<T>&); | |
75 | template<class T> complex<T> conj(const complex<T>&); | |
2821a748 | 76 | template<class T> complex<T> polar(const T& rho, const T& theta); |
a024740d BK |
77 | |
78 | // 26.2.8 transcendentals: | |
79 | template<class T> complex<T> cos(const complex<T>&); | |
80 | template<class T> complex<T> cosh(const complex<T>&); | |
81 | template<class T> complex<T> exp(const complex<T>&); | |
82 | template<class T> complex<T> log(const complex<T>&); | |
83 | template<class T> complex<T> log10(const complex<T>&); | |
84 | template<class T> complex<T> pow(const complex<T>&, int); | |
85 | template<class T> complex<T> pow(const complex<T>&, const T&); | |
86 | template<class T> complex<T> pow(const complex<T>&, const complex<T>&); | |
87 | template<class T> complex<T> pow(const T&, const complex<T>&); | |
88 | template<class T> complex<T> sin (const complex<T>&); | |
89 | template<class T> complex<T> sinh(const complex<T>&); | |
90 | template<class T> complex<T> sqrt(const complex<T>&); | |
91 | template<class T> complex<T> tan(const complex<T>&); | |
92 | template<class T> complex<T> tanh(const complex<T>&); | |
93 | } |