]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/testsuite/26_numerics/headers/complex/synopsis.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 26_numerics / headers / complex / synopsis.cc
CommitLineData
a024740d
BK
1// { dg-do compile }
2
818ab71a 3// Copyright (C) 2007-2016 Free Software Foundation, Inc.
a024740d
BK
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
748086b7 8// Free Software Foundation; either version 3, or (at your option)
a024740d
BK
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
748086b7
JJ
17// with this library; see the file COPYING3. If not see
18// <http://www.gnu.org/licenses/>.
a024740d
BK
19
20#include <complex>
21
22namespace std {
23 template<class T> class complex;
24 template<> class complex<float>;
25 template<> class complex<double>;
26 template<> class complex<long double>;
27
28 // 26.2.6 operators:
29 template<class T>
30 complex<T> operator+(const complex<T>&, const complex<T>&);
31 template<class T> complex<T> operator+(const complex<T>&, const T&);
32 template<class T> complex<T> operator+(const T&, const complex<T>&);
33 template<class T> complex<T> operator-
34 (const complex<T>&, const complex<T>&);
35 template<class T> complex<T> operator-(const complex<T>&, const T&);
36 template<class T> complex<T> operator-(const T&, const complex<T>&);
37 template<class T> complex<T> operator*
38 (const complex<T>&, const complex<T>&);
39 template<class T> complex<T> operator*(const complex<T>&, const T&);
40 template<class T> complex<T> operator*(const T&, const complex<T>&);
41 template<class T> complex<T> operator/
42 (const complex<T>&, const complex<T>&);
43 template<class T> complex<T> operator/(const complex<T>&, const T&);
44 template<class T> complex<T> operator/(const T&, const complex<T>&);
45 template<class T> complex<T> operator+(const complex<T>&);
46 template<class T> complex<T> operator-(const complex<T>&);
6f20ac34 47 template<class T> _GLIBCXX_CONSTEXPR bool operator==
a024740d 48 (const complex<T>&, const complex<T>&);
6f20ac34
JW
49 template<class T> _GLIBCXX_CONSTEXPR bool operator==
50 (const complex<T>&, const T&);
51 template<class T> _GLIBCXX_CONSTEXPR bool operator==
52 (const T&, const complex<T>&);
a024740d
BK
53
54
6f20ac34
JW
55 template<class T> _GLIBCXX_CONSTEXPR bool operator!=
56 (const complex<T>&, const complex<T>&);
57 template<class T> _GLIBCXX_CONSTEXPR bool operator!=
58 (const complex<T>&, const T&);
59 template<class T> _GLIBCXX_CONSTEXPR bool operator!=
60 (const T&, const complex<T>&);
a024740d
BK
61 template<class T, class charT, class traits>
62 basic_istream<charT, traits>&
63 operator>>(basic_istream<charT, traits>&, complex<T>&);
64 template<class T, class charT, class traits>
65 basic_ostream<charT, traits>&
66 operator<<(basic_ostream<charT, traits>&, const complex<T>&);
67
68 // 26.2.7 values:
6f20ac34
JW
69 template<class T> _GLIBCXX_CONSTEXPR T real(const complex<T>&);
70 template<class T> _GLIBCXX_CONSTEXPR T imag(const complex<T>&);
a024740d
BK
71 template<class T> T abs(const complex<T>&);
72 template<class T> T arg(const complex<T>&);
73 template<class T> T norm(const complex<T>&);
74 template<class T> complex<T> conj(const complex<T>&);
2821a748 75 template<class T> complex<T> polar(const T& rho, const T& theta);
a024740d
BK
76
77 // 26.2.8 transcendentals:
78 template<class T> complex<T> cos(const complex<T>&);
79 template<class T> complex<T> cosh(const complex<T>&);
80 template<class T> complex<T> exp(const complex<T>&);
81 template<class T> complex<T> log(const complex<T>&);
82 template<class T> complex<T> log10(const complex<T>&);
83 template<class T> complex<T> pow(const complex<T>&, int);
84 template<class T> complex<T> pow(const complex<T>&, const T&);
85 template<class T> complex<T> pow(const complex<T>&, const complex<T>&);
86 template<class T> complex<T> pow(const T&, const complex<T>&);
87 template<class T> complex<T> sin (const complex<T>&);
88 template<class T> complex<T> sinh(const complex<T>&);
89 template<class T> complex<T> sqrt(const complex<T>&);
90 template<class T> complex<T> tan(const complex<T>&);
91 template<class T> complex<T> tanh(const complex<T>&);
92}