]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/26_numerics/headers/complex/synopsis.cc
[multiple changes]
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 26_numerics / headers / complex / synopsis.cc
1 // { dg-do compile }
2
3 // Copyright (C) 2007 Free Software Foundation, Inc.
4 //
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 2, or (at your option)
9 // any later version.
10
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15
16 // You should have received a copy of the GNU General Public License along
17 // with this library; see the file COPYING. If not, write to the Free
18 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
19 // USA.
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>&);
48 template<class T> bool operator==
49 (const complex<T>&, const complex<T>&);
50 template<class T> bool operator==(const complex<T>&, const T&);
51 template<class T> bool operator==(const T&, const complex<T>&);
52
53
54 template<class T> bool operator!=(const complex<T>&, const complex<T>&);
55 template<class T> bool operator!=(const complex<T>&, const T&);
56 template<class T> bool operator!=(const T&, const complex<T>&);
57 template<class T, class charT, class traits>
58 basic_istream<charT, traits>&
59 operator>>(basic_istream<charT, traits>&, complex<T>&);
60 template<class T, class charT, class traits>
61 basic_ostream<charT, traits>&
62 operator<<(basic_ostream<charT, traits>&, const complex<T>&);
63
64 // 26.2.7 values:
65 template<class T> T real(const complex<T>&);
66 template<class T> T imag(const complex<T>&);
67 template<class T> T abs(const complex<T>&);
68 template<class T> T arg(const complex<T>&);
69 template<class T> T norm(const complex<T>&);
70 template<class T> complex<T> conj(const complex<T>&);
71 template<class T> complex<T> polar(const T& rho, const T& theta = 0);
72
73 // 26.2.8 transcendentals:
74 template<class T> complex<T> cos(const complex<T>&);
75 template<class T> complex<T> cosh(const complex<T>&);
76 template<class T> complex<T> exp(const complex<T>&);
77 template<class T> complex<T> log(const complex<T>&);
78 template<class T> complex<T> log10(const complex<T>&);
79 template<class T> complex<T> pow(const complex<T>&, int);
80 template<class T> complex<T> pow(const complex<T>&, const T&);
81 template<class T> complex<T> pow(const complex<T>&, const complex<T>&);
82 template<class T> complex<T> pow(const T&, const complex<T>&);
83 template<class T> complex<T> sin (const complex<T>&);
84 template<class T> complex<T> sinh(const complex<T>&);
85 template<class T> complex<T> sqrt(const complex<T>&);
86 template<class T> complex<T> tan(const complex<T>&);
87 template<class T> complex<T> tanh(const complex<T>&);
88 }