Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / libstdc++-v3 / src / complex_io.cc
blob636bc67b469ce61e679c571f503efc896955c530
1 // The template and inlines for the -*- C++ -*- complex number classes.
3 // Copyright (C) 2000, 2001, 2005, 2006, 2009 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 3, or (at your option)
9 // any later version.
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.
16 // Under Section 7 of GPL version 3, you are granted additional
17 // permissions described in the GCC Runtime Library Exception, version
18 // 3.1, as published by the Free Software Foundation.
20 // You should have received a copy of the GNU General Public License and
21 // a copy of the GCC Runtime Library Exception along with this program;
22 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 // <http://www.gnu.org/licenses/>.
25 #include <complex>
27 _GLIBCXX_BEGIN_NAMESPACE(std)
29 template
30 basic_istream<char, char_traits<char> >&
31 operator>>(basic_istream<char, char_traits<char> >&, complex<float>&);
33 template
34 basic_ostream<char, char_traits<char> >&
35 operator<<(basic_ostream<char, char_traits<char> >&,
36 const complex<float>&);
38 template
39 basic_istream<char, char_traits<char> >&
40 operator>>(basic_istream<char, char_traits<char> >&, complex<double>&);
42 template
43 basic_ostream<char, char_traits<char> >&
44 operator<<(basic_ostream<char, char_traits<char> >&,
45 const complex<double>&);
47 template
48 basic_istream<char, char_traits<char> >&
49 operator>>(basic_istream<char, char_traits<char> >&,
50 complex<long double>&);
52 template
53 basic_ostream<char, char_traits<char> >&
54 operator<<(basic_ostream<char, char_traits<char> >&,
55 const complex<long double>&);
57 #ifdef _GLIBCXX_USE_WCHAR_T
58 template
59 basic_istream<wchar_t, char_traits<wchar_t> >&
60 operator>>(basic_istream<wchar_t, char_traits<wchar_t> >&,
61 complex<float>&);
63 template
64 basic_ostream<wchar_t, char_traits<wchar_t> >&
65 operator<<(basic_ostream<wchar_t, char_traits<wchar_t> >&,
66 const complex<float>&);
68 template
69 basic_istream<wchar_t, char_traits<wchar_t> >&
70 operator>>(basic_istream<wchar_t, char_traits<wchar_t> >&,
71 complex<double>&);
73 template
74 basic_ostream<wchar_t, char_traits<wchar_t> >&
75 operator<<(basic_ostream<wchar_t, char_traits<wchar_t> >&,
76 const complex<double>&);
78 template
79 basic_istream<wchar_t, char_traits<wchar_t> >&
80 operator>>(basic_istream<wchar_t, char_traits<wchar_t> >&,
81 complex<long double>&);
83 template
84 basic_ostream<wchar_t, char_traits<wchar_t> >&
85 operator<<(basic_ostream<wchar_t, char_traits<wchar_t> >&,
86 const complex<long double>&);
87 #endif //_GLIBCXX_USE_WCHAR_T
89 _GLIBCXX_END_NAMESPACE
91 // XXX GLIBCXX_ABI Deprecated
92 #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
94 #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
95 extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
97 _GLIBCXX_LDBL_COMPAT (_ZStlsIdcSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E,
98 _ZStlsIecSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E);
99 #ifdef _GLIBCXX_USE_WCHAR_T
100 _GLIBCXX_LDBL_COMPAT (_ZStlsIdwSt11char_traitsIwEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E,
101 _ZStlsIewSt11char_traitsIwEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E);
102 #endif
103 _GLIBCXX_LDBL_COMPAT (_ZStrsIdcSt11char_traitsIcEERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E,
104 _ZStrsIecSt11char_traitsIcEERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E);
105 #ifdef _GLIBCXX_USE_WCHAR_T
106 _GLIBCXX_LDBL_COMPAT (_ZStrsIdwSt11char_traitsIwEERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E,
107 _ZStrsIewSt11char_traitsIwEERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E);
108 #endif
110 #endif // _GLIBCXX_LONG_DOUBLE_COMPAT