]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/26_numerics/headers/complex/synopsis.cc
2 // { dg-require-normal-namespace "" }
4 // Copyright (C) 2007-2019 Free Software Foundation, Inc.
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
9 // Free Software Foundation; either version 3, or (at your option)
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.
17 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING3. If not see
19 // <http://www.gnu.org/licenses/>.
24 template<class T
> class complex;
25 template<> class complex<float>;
26 template<> class complex<double>;
27 template<> class complex<long double>;
31 _GLIBCXX20_CONSTEXPR
complex<T
>
32 operator+(const complex<T
>&, const complex<T
>&);
34 _GLIBCXX20_CONSTEXPR
complex<T
> operator+(const complex<T
>&, const T
&);
36 _GLIBCXX20_CONSTEXPR
complex<T
> operator+(const T
&, const complex<T
>&);
39 _GLIBCXX20_CONSTEXPR
complex<T
>
40 operator-(const complex<T
>&, const complex<T
>&);
42 _GLIBCXX20_CONSTEXPR
complex<T
> operator-(const complex<T
>&, const T
&);
44 _GLIBCXX20_CONSTEXPR
complex<T
> operator-(const T
&, const complex<T
>&);
47 _GLIBCXX20_CONSTEXPR
complex<T
> operator*
48 (const complex<T
>&, const complex<T
>&);
50 _GLIBCXX20_CONSTEXPR
complex<T
> operator*(const complex<T
>&, const T
&);
52 _GLIBCXX20_CONSTEXPR
complex<T
> operator*(const T
&, const complex<T
>&);
55 _GLIBCXX20_CONSTEXPR
complex<T
>
56 operator/(const complex<T
>&, const complex<T
>&);
58 _GLIBCXX20_CONSTEXPR
complex<T
> operator/(const complex<T
>&, const T
&);
60 _GLIBCXX20_CONSTEXPR
complex<T
> operator/(const T
&, const complex<T
>&);
63 _GLIBCXX20_CONSTEXPR
complex<T
> operator+(const complex<T
>&);
65 _GLIBCXX20_CONSTEXPR
complex<T
> operator-(const complex<T
>&);
68 _GLIBCXX_CONSTEXPR
bool operator==(const complex<T
>&, const complex<T
>&);
70 _GLIBCXX_CONSTEXPR
bool operator==(const complex<T
>&, const T
&);
72 _GLIBCXX_CONSTEXPR
bool operator==(const T
&, const complex<T
>&);
75 _GLIBCXX_CONSTEXPR
bool operator!=(const complex<T
>&, const complex<T
>&);
77 _GLIBCXX_CONSTEXPR
bool operator!=(const complex<T
>&, const T
&);
79 _GLIBCXX_CONSTEXPR
bool operator!=(const T
&, const complex<T
>&);
81 template<class T
, class charT
, class traits
>
82 basic_istream
<charT
, traits
>&
83 operator>>(basic_istream
<charT
, traits
>&, complex<T
>&);
84 template<class T
, class charT
, class traits
>
85 basic_ostream
<charT
, traits
>&
86 operator<<(basic_ostream
<charT
, traits
>&, const complex<T
>&);
89 template<class T
> _GLIBCXX_CONSTEXPR T
real(const complex<T
>&);
90 template<class T
> _GLIBCXX_CONSTEXPR T
imag(const complex<T
>&);
91 template<class T
> T
abs(const complex<T
>&);
92 template<class T
> _GLIBCXX20_CONSTEXPR T
arg(const complex<T
>&);
93 template<class T
> _GLIBCXX20_CONSTEXPR T
norm(const complex<T
>&);
94 template<class T
> _GLIBCXX20_CONSTEXPR
complex<T
> conj(const complex<T
>&);
95 template<class T
> _GLIBCXX20_CONSTEXPR
complex<T
> proj(const complex<T
>&);
96 template<class T
> complex<T
> polar(const T
& rho
, const T
& theta
);
98 // 26.2.8 transcendentals:
99 template<class T
> complex<T
> cos(const complex<T
>&);
100 template<class T
> complex<T
> cosh(const complex<T
>&);
101 template<class T
> complex<T
> exp(const complex<T
>&);
102 template<class T
> complex<T
> log(const complex<T
>&);
103 template<class T
> complex<T
> log10(const complex<T
>&);
104 template<class T
> complex<T
> pow(const complex<T
>&, int);
105 template<class T
> complex<T
> pow(const complex<T
>&, const T
&);
106 template<class T
> complex<T
> pow(const complex<T
>&, const complex<T
>&);
107 template<class T
> complex<T
> pow(const T
&, const complex<T
>&);
108 template<class T
> complex<T
> sin (const complex<T
>&);
109 template<class T
> complex<T
> sinh(const complex<T
>&);
110 template<class T
> complex<T
> sqrt(const complex<T
>&);
111 template<class T
> complex<T
> tan(const complex<T
>&);
112 template<class T
> complex<T
> tanh(const complex<T
>&);