gccxml_gem 0.9-x86-darwin-9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. data/Rakefile +75 -0
  2. data/bin/gccxml +0 -0
  3. data/bin/gccxml_cc1plus +0 -0
  4. data/gccxml.rb +44 -0
  5. data/share/doc/gccxml-0.9/Copyright.txt +55 -0
  6. data/share/doc/gccxml-0.9/gccxml.html +168 -0
  7. data/share/doc/gccxml-0.9/gccxml.txt +293 -0
  8. data/share/gccxml-0.9/GCC/2.95/algorithm +76 -0
  9. data/share/gccxml-0.9/GCC/2.95/bitset +17 -0
  10. data/share/gccxml-0.9/GCC/2.95/cctype +24 -0
  11. data/share/gccxml-0.9/GCC/2.95/clocale +14 -0
  12. data/share/gccxml-0.9/GCC/2.95/cmath +33 -0
  13. data/share/gccxml-0.9/GCC/2.95/complex +38 -0
  14. data/share/gccxml-0.9/GCC/2.95/csetjmp +13 -0
  15. data/share/gccxml-0.9/GCC/2.95/csignal +14 -0
  16. data/share/gccxml-0.9/GCC/2.95/cstdarg +12 -0
  17. data/share/gccxml-0.9/GCC/2.95/cstddef +13 -0
  18. data/share/gccxml-0.9/GCC/2.95/cstdio +55 -0
  19. data/share/gccxml-0.9/GCC/2.95/cstdlib +66 -0
  20. data/share/gccxml-0.9/GCC/2.95/cstring +34 -0
  21. data/share/gccxml-0.9/GCC/2.95/ctime +24 -0
  22. data/share/gccxml-0.9/GCC/2.95/cwchar +65 -0
  23. data/share/gccxml-0.9/GCC/2.95/cwctype +31 -0
  24. data/share/gccxml-0.9/GCC/2.95/deque +19 -0
  25. data/share/gccxml-0.9/GCC/2.95/exception +20 -0
  26. data/share/gccxml-0.9/GCC/2.95/fstream +23 -0
  27. data/share/gccxml-0.9/GCC/2.95/functional +64 -0
  28. data/share/gccxml-0.9/GCC/2.95/gccxml_bitset +1066 -0
  29. data/share/gccxml-0.9/GCC/2.95/iomanip +20 -0
  30. data/share/gccxml-0.9/GCC/2.95/iosfwd +20 -0
  31. data/share/gccxml-0.9/GCC/2.95/iostream +27 -0
  32. data/share/gccxml-0.9/GCC/2.95/iterator +39 -0
  33. data/share/gccxml-0.9/GCC/2.95/list +19 -0
  34. data/share/gccxml-0.9/GCC/2.95/map +20 -0
  35. data/share/gccxml-0.9/GCC/2.95/memory +21 -0
  36. data/share/gccxml-0.9/GCC/2.95/new +13 -0
  37. data/share/gccxml-0.9/GCC/2.95/numeric +15 -0
  38. data/share/gccxml-0.9/GCC/2.95/pthread.h +16 -0
  39. data/share/gccxml-0.9/GCC/2.95/queue +20 -0
  40. data/share/gccxml-0.9/GCC/2.95/set +20 -0
  41. data/share/gccxml-0.9/GCC/2.95/sstream +24 -0
  42. data/share/gccxml-0.9/GCC/2.95/stack +19 -0
  43. data/share/gccxml-0.9/GCC/2.95/std/bastring.cc +524 -0
  44. data/share/gccxml-0.9/GCC/2.95/std/complext.h +397 -0
  45. data/share/gccxml-0.9/GCC/2.95/std/dcomplex.h +92 -0
  46. data/share/gccxml-0.9/GCC/2.95/std/fcomplex.h +88 -0
  47. data/share/gccxml-0.9/GCC/2.95/std/gslice_array.h +170 -0
  48. data/share/gccxml-0.9/GCC/2.95/std/indirect_array.h +157 -0
  49. data/share/gccxml-0.9/GCC/2.95/std/ldcomplex.h +96 -0
  50. data/share/gccxml-0.9/GCC/2.95/std/mask_array.h +154 -0
  51. data/share/gccxml-0.9/GCC/2.95/std/slice_array.h +156 -0
  52. data/share/gccxml-0.9/GCC/2.95/std/std_valarray.h +728 -0
  53. data/share/gccxml-0.9/GCC/2.95/std/straits.h +162 -0
  54. data/share/gccxml-0.9/GCC/2.95/std/valarray_meta.h +1035 -0
  55. data/share/gccxml-0.9/GCC/2.95/stdexcept +17 -0
  56. data/share/gccxml-0.9/GCC/2.95/stl_alloc.h +1057 -0
  57. data/share/gccxml-0.9/GCC/2.95/stl_bvector.h +836 -0
  58. data/share/gccxml-0.9/GCC/2.95/stl_deque.h +1699 -0
  59. data/share/gccxml-0.9/GCC/2.95/stl_list.h +843 -0
  60. data/share/gccxml-0.9/GCC/2.95/stl_tree.h +1331 -0
  61. data/share/gccxml-0.9/GCC/2.95/stl_vector.h +828 -0
  62. data/share/gccxml-0.9/GCC/2.95/string +26 -0
  63. data/share/gccxml-0.9/GCC/2.95/strstream +23 -0
  64. data/share/gccxml-0.9/GCC/2.95/typeinfo +11 -0
  65. data/share/gccxml-0.9/GCC/2.95/utility +25 -0
  66. data/share/gccxml-0.9/GCC/2.95/valarray +52 -0
  67. data/share/gccxml-0.9/GCC/2.95/vector +19 -0
  68. data/share/gccxml-0.9/GCC/2.96/sstream +305 -0
  69. data/share/gccxml-0.9/GCC/3.0/pthread.h +16 -0
  70. data/share/gccxml-0.9/GCC/3.1/pthread.h +16 -0
  71. data/share/gccxml-0.9/GCC/3.2/bits/fstream.tcc +500 -0
  72. data/share/gccxml-0.9/GCC/3.2/bits/istream.tcc +1207 -0
  73. data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.h +1810 -0
  74. data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.tcc +2397 -0
  75. data/share/gccxml-0.9/GCC/3.2/bits/messages_members.h +108 -0
  76. data/share/gccxml-0.9/GCC/3.2/bits/ostream.tcc +713 -0
  77. data/share/gccxml-0.9/GCC/3.2/bits/sstream.tcc +241 -0
  78. data/share/gccxml-0.9/GCC/3.2/bits/stl_deque.h +1682 -0
  79. data/share/gccxml-0.9/GCC/3.2/bits/stl_list.h +989 -0
  80. data/share/gccxml-0.9/GCC/3.2/bits/stl_tree.h +1462 -0
  81. data/share/gccxml-0.9/GCC/3.2/bits/stl_vector.h +1085 -0
  82. data/share/gccxml-0.9/GCC/3.2/bits/valarray_meta.h +1063 -0
  83. data/share/gccxml-0.9/GCC/3.2/fstream +579 -0
  84. data/share/gccxml-0.9/GCC/3.2/pthread.h +16 -0
  85. data/share/gccxml-0.9/GCC/3.2/sstream +384 -0
  86. data/share/gccxml-0.9/GCC/3.3/bits/fstream.tcc +530 -0
  87. data/share/gccxml-0.9/GCC/3.3/bits/list.tcc +378 -0
  88. data/share/gccxml-0.9/GCC/3.3/bits/locale_facets.h +2050 -0
  89. data/share/gccxml-0.9/GCC/3.3/bits/messages_members.h +108 -0
  90. data/share/gccxml-0.9/GCC/3.3/bits/sstream.tcc +243 -0
  91. data/share/gccxml-0.9/GCC/3.3/bits/stl_deque.h +1603 -0
  92. data/share/gccxml-0.9/GCC/3.3/bits/stl_list.h +1167 -0
  93. data/share/gccxml-0.9/GCC/3.3/bits/stl_tree.h +1462 -0
  94. data/share/gccxml-0.9/GCC/3.3/bits/stl_vector.h +992 -0
  95. data/share/gccxml-0.9/GCC/3.3/bits/valarray_meta.h +1135 -0
  96. data/share/gccxml-0.9/GCC/3.3/fstream +842 -0
  97. data/share/gccxml-0.9/GCC/3.3/gccxml_builtins.h +22 -0
  98. data/share/gccxml-0.9/GCC/3.3/sstream +638 -0
  99. data/share/gccxml-0.9/GCC/3.4/gccxml_builtins.h +91 -0
  100. data/share/gccxml-0.9/GCC/4.0/gccxml_builtins.h +128 -0
  101. data/share/gccxml-0.9/GCC/4.1/bits/gthr-default.h +618 -0
  102. data/share/gccxml-0.9/GCC/4.1/gccxml_builtins.h +131 -0
  103. data/share/gccxml-0.9/GCC/4.2/gccxml_builtins.h +131 -0
  104. data/share/gccxml-0.9/GCC/find_flags +105 -0
  105. data/share/gccxml-0.9/Intel/find_flags +56 -0
  106. data/share/gccxml-0.9/Intel/pthread.h +16 -0
  107. data/share/gccxml-0.9/MIPSpro/7.3/exception +9 -0
  108. data/share/gccxml-0.9/MIPSpro/7.3/gccxml_mpro_internals.h +21 -0
  109. data/share/gccxml-0.9/MIPSpro/7.3/iomanip +161 -0
  110. data/share/gccxml-0.9/MIPSpro/7.3/ostream +9 -0
  111. data/share/gccxml-0.9/MIPSpro/7.3/stddef.h +9 -0
  112. data/share/gccxml-0.9/MIPSpro/7.3/stl_config.h +9 -0
  113. data/share/gccxml-0.9/MIPSpro/7.3/stl_locale.h +17 -0
  114. data/share/gccxml-0.9/MIPSpro/7.3/stl_monetary.h +14 -0
  115. data/share/gccxml-0.9/MIPSpro/7.3/stl_numeric_facets.h +13 -0
  116. data/share/gccxml-0.9/MIPSpro/7.3/stl_threads.h +11 -0
  117. data/share/gccxml-0.9/MIPSpro/7.3/string +18 -0
  118. data/share/gccxml-0.9/MIPSpro/find_flags +137 -0
  119. data/share/gccxml-0.9/Sun/5.8/adaptation.patch +168 -0
  120. data/share/gccxml-0.9/Sun/README +8 -0
  121. data/share/gccxml-0.9/Sun/adapt_headers.sh +24 -0
  122. data/share/gccxml-0.9/Sun/find_flags +69 -0
  123. data/share/gccxml-0.9/gccxml_config +2 -0
  124. data/share/gccxml-0.9/gccxml_find_flags +93 -0
  125. data/share/man/man1/gccxml.1 +246 -0
  126. metadata +204 -0
@@ -0,0 +1,88 @@
1
+ // The -*- C++ -*- float_complex class.
2
+ // Copyright (C) 1994 Free Software Foundation
3
+
4
+ // This file is part of the GNU ANSI C++ Library. This library is free
5
+ // software; you can redistribute it and/or modify it under the
6
+ // terms of the GNU General Public License as published by the
7
+ // Free Software Foundation; either version 2, or (at your option)
8
+ // any later version.
9
+
10
+ // This library is distributed in the hope that it will be useful,
11
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ // GNU General Public License for more details.
14
+
15
+ // You should have received a copy of the GNU General Public License
16
+ // along with this library; see the file COPYING. If not, write to the Free
17
+ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
+
19
+ // As a special exception, if you link this library with files
20
+ // compiled with a GNU compiler to produce an executable, this does not cause
21
+ // the resulting executable to be covered by the GNU General Public License.
22
+ // This exception does not however invalidate any other reasons why
23
+ // the executable file might be covered by the GNU General Public License.
24
+
25
+ // Written by Jason Merrill based upon the specification in the 27 May 1994
26
+ // C++ working paper, ANSI document X3J16/94-0098.
27
+
28
+ #ifndef __FCOMPLEX__
29
+ #define __FCOMPLEX__
30
+
31
+ #ifdef __GNUG__
32
+ #pragma interface "fcomplex"
33
+ #endif
34
+
35
+ extern "C++" {
36
+ template <>
37
+ class complex<float>
38
+ {
39
+ public:
40
+ complex (float r = 0, float i = 0): re (r), im (i) { }
41
+ explicit complex (const complex<double>& r);
42
+ explicit complex (const complex<long double>& r);
43
+
44
+ complex& operator+= (const complex& r) { return __doapl (this, r); }
45
+ complex& operator-= (const complex& r) { return __doami (this, r); }
46
+ complex& operator*= (const complex& r) { return __doaml (this, r); }
47
+ complex& operator/= (const complex& r) { return __doadv (this, r); }
48
+
49
+ float real () const { return re; }
50
+ float imag () const { return im; }
51
+ private:
52
+ float re, im;
53
+
54
+ friend complex& __doapl<> (complex *, const complex&);
55
+ friend complex& __doami<> (complex *, const complex&);
56
+ friend complex& __doaml<> (complex *, const complex&);
57
+ friend complex& __doadv<> (complex *, const complex&);
58
+
59
+ #ifndef __STRICT_ANSI__
60
+ friend inline complex operator + (const complex& x, float y)
61
+ { return operator+<> (x, y); }
62
+ friend inline complex operator + (float x, const complex& y)
63
+ { return operator+<> (x, y); }
64
+ friend inline complex operator - (const complex& x, float y)
65
+ { return operator-<> (x, y); }
66
+ friend inline complex operator - (float x, const complex& y)
67
+ { return operator-<> (x, y); }
68
+ friend inline complex operator * (const complex& x, float y)
69
+ { return operator*<> (x, y); }
70
+ friend inline complex operator * (float x, const complex& y)
71
+ { return operator*<> (x, y); }
72
+ friend inline complex operator / (const complex& x, float y)
73
+ { return operator/<> (x, y); }
74
+ friend inline complex operator / (float x, const complex& y)
75
+ { return operator/<> (x, y); }
76
+ friend inline bool operator == (const complex& x, float y)
77
+ { return operator==<> (x, y); }
78
+ friend inline bool operator == (float x, const complex& y)
79
+ { return operator==<> (x, y); }
80
+ friend inline bool operator != (const complex& x, float y)
81
+ { return operator!=<> (x, y); }
82
+ friend inline bool operator != (float x, const complex& y)
83
+ { return operator!=<> (x, y); }
84
+ #endif /* __STRICT_ANSI__ */
85
+ };
86
+ } // extern "C++"
87
+
88
+ #endif
@@ -0,0 +1,170 @@
1
+ // The template and inlines for the -*- C++ -*- gslice_array class.
2
+
3
+ // Copyright (C) 1997-1999 Cygnus Solutions
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, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
19
+ // USA.
20
+
21
+ // As a special exception, you may use this file as part of a free software
22
+ // library without restriction. Specifically, if other files instantiate
23
+ // templates or use macros or inline functions from this file, or you compile
24
+ // this file and link it with other files to produce an executable, this
25
+ // file does not by itself cause the resulting executable to be covered by
26
+ // the GNU General Public License. This exception does not however
27
+ // invalidate any other reasons why the executable file might be covered by
28
+ // the GNU General Public License.
29
+
30
+ // Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
31
+
32
+ #ifndef __GSLICE_ARRAY__
33
+ #define __GSLICE_ARRAY__
34
+
35
+ extern "C++" {
36
+
37
+ template<typename _Tp> class gslice_array
38
+ {
39
+ public:
40
+ typedef _Tp value_type;
41
+
42
+ void operator= (const valarray<_Tp>&) const;
43
+ void operator*= (const valarray<_Tp>&) const;
44
+ void operator/= (const valarray<_Tp>&) const;
45
+ void operator%= (const valarray<_Tp>&) const;
46
+ void operator+= (const valarray<_Tp>&) const;
47
+ void operator-= (const valarray<_Tp>&) const;
48
+ void operator^= (const valarray<_Tp>&) const;
49
+ void operator&= (const valarray<_Tp>&) const;
50
+ void operator|= (const valarray<_Tp>&) const;
51
+ void operator<<=(const valarray<_Tp>&) const;
52
+ void operator>>=(const valarray<_Tp>&) const;
53
+ void operator=(const _Tp&);
54
+
55
+ template<class _Dom>
56
+ void operator= (const _Expr<_Dom,_Tp>&) const;
57
+ template<class _Dom>
58
+ void operator*= (const _Expr<_Dom,_Tp>&) const;
59
+ template<class _Dom>
60
+ void operator/= (const _Expr<_Dom,_Tp>&) const;
61
+ template<class _Dom>
62
+ void operator%= (const _Expr<_Dom,_Tp>&) const;
63
+ template<class _Dom>
64
+ void operator+= (const _Expr<_Dom,_Tp>&) const;
65
+ template<class _Dom>
66
+ void operator-= (const _Expr<_Dom,_Tp>&) const;
67
+ template<class _Dom>
68
+ void operator^= (const _Expr<_Dom,_Tp>&) const;
69
+ template<class _Dom>
70
+ void operator&= (const _Expr<_Dom,_Tp>&) const;
71
+ template<class _Dom>
72
+ void operator|= (const _Expr<_Dom,_Tp>&) const;
73
+ template<class _Dom>
74
+ void operator<<= (const _Expr<_Dom,_Tp>&) const;
75
+ template<class _Dom>
76
+ void operator>>= (const _Expr<_Dom,_Tp>&) const;
77
+
78
+ private:
79
+ _Array<_Tp> _M_array;
80
+ const valarray<size_t>& _M_index;
81
+
82
+ friend class valarray<_Tp>;
83
+
84
+ gslice_array (_Array<_Tp>, const valarray<size_t>&);
85
+
86
+ // this constructor needs to be implemented.
87
+ gslice_array (const gslice_array&);
88
+
89
+ // not implemented
90
+ gslice_array();
91
+ gslice_array& operator= (const gslice_array&);
92
+ };
93
+
94
+ template<typename _Tp>
95
+ inline
96
+ gslice_array<_Tp>::gslice_array (_Array<_Tp> __a,
97
+ const valarray<size_t>& __i)
98
+ : _M_array (__a), _M_index (__i) {}
99
+
100
+
101
+ template<typename _Tp>
102
+ inline
103
+ gslice_array<_Tp>::gslice_array (const gslice_array<_Tp>& __a)
104
+ : _M_array (__a._M_array), _M_index (__a._M_index) {}
105
+
106
+
107
+ template<typename _Tp>
108
+ inline void
109
+ gslice_array<_Tp>::operator= (const _Tp& __t)
110
+ {
111
+ __valarray_fill (_M_array, _Array<size_t>(_M_index),
112
+ _M_index.size(), __t);
113
+ }
114
+
115
+ template<typename _Tp>
116
+ inline void
117
+ gslice_array<_Tp>::operator= (const valarray<_Tp>& __v) const
118
+ {
119
+ __valarray_copy (_Array<_Tp> (__v), __v.size (),
120
+ _M_array, _Array<size_t>(_M_index));
121
+ }
122
+
123
+ template<typename _Tp>
124
+ template<class E>
125
+ inline void
126
+ gslice_array<_Tp>::operator= (const _Expr<E, _Tp>& __e) const
127
+ {
128
+ __valarray_copy (__e, _M_index.size(), _M_array,
129
+ _Array<size_t>(_M_index));
130
+ }
131
+
132
+ #undef _DEFINE_VALARRAY_OPERATOR
133
+ #define _DEFINE_VALARRAY_OPERATOR(op, name) \
134
+ template<typename _Tp> \
135
+ inline void \
136
+ gslice_array<_Tp>::operator op##= (const valarray<_Tp>& __v) const \
137
+ { \
138
+ _Array_augmented_##name (_M_array, _Array<size_t>(_M_index), \
139
+ _Array<_Tp> (__v), __v.size ()); \
140
+ } \
141
+ \
142
+ template<typename _Tp> template<class E> \
143
+ inline void \
144
+ gslice_array<_Tp>::operator op##= (const _Expr<E, _Tp>& __e) const \
145
+ { \
146
+ _Array_augmented_##name (_M_array, _Array<size_t>(_M_index), __e, \
147
+ _M_index.size()); \
148
+ }
149
+
150
+ _DEFINE_VALARRAY_OPERATOR(*, multiplies)
151
+ _DEFINE_VALARRAY_OPERATOR(/, divides)
152
+ _DEFINE_VALARRAY_OPERATOR(%, modulus)
153
+ _DEFINE_VALARRAY_OPERATOR(+, plus)
154
+ _DEFINE_VALARRAY_OPERATOR(-, minus)
155
+ _DEFINE_VALARRAY_OPERATOR(^, xor)
156
+ _DEFINE_VALARRAY_OPERATOR(&, and)
157
+ _DEFINE_VALARRAY_OPERATOR(|, or)
158
+ _DEFINE_VALARRAY_OPERATOR(<<, shift_left)
159
+ _DEFINE_VALARRAY_OPERATOR(>>, shift_right)
160
+
161
+ #undef _DEFINE_VALARRAY_OPERATOR
162
+
163
+ } // extern "C++"
164
+
165
+
166
+ #endif // __GSLICE_ARRAY__
167
+
168
+ // Local Variables:
169
+ // mode:c++
170
+ // End:
@@ -0,0 +1,157 @@
1
+ // The template and inlines for the -*- C++ -*- indirect_array class.
2
+
3
+ // Copyright (C) 1997-1999 Cygnus Solutions
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, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
19
+ // USA.
20
+
21
+ // As a special exception, you may use this file as part of a free software
22
+ // library without restriction. Specifically, if other files instantiate
23
+ // templates or use macros or inline functions from this file, or you compile
24
+ // this file and link it with other files to produce an executable, this
25
+ // file does not by itself cause the resulting executable to be covered by
26
+ // the GNU General Public License. This exception does not however
27
+ // invalidate any other reasons why the executable file might be covered by
28
+ // the GNU General Public License.
29
+
30
+ // Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
31
+
32
+ #ifndef __INDIRECT_ARRAY__
33
+ #define __INDIRECT_ARRAY__
34
+
35
+ extern "C++" {
36
+
37
+ template <class _Tp> class indirect_array
38
+ {
39
+ public:
40
+ typedef _Tp value_type;
41
+
42
+ void operator= (const valarray<_Tp>&) const;
43
+ void operator*= (const valarray<_Tp>&) const;
44
+ void operator/= (const valarray<_Tp>&) const;
45
+ void operator%= (const valarray<_Tp>&) const;
46
+ void operator+= (const valarray<_Tp>&) const;
47
+ void operator-= (const valarray<_Tp>&) const;
48
+ void operator^= (const valarray<_Tp>&) const;
49
+ void operator&= (const valarray<_Tp>&) const;
50
+ void operator|= (const valarray<_Tp>&) const;
51
+ void operator<<= (const valarray<_Tp>&) const;
52
+ void operator>>= (const valarray<_Tp>&) const;
53
+ void operator= (const _Tp&);
54
+
55
+ template<class _Dom>
56
+ void operator= (const _Expr<_Dom, _Tp>&) const;
57
+ template<class _Dom>
58
+ void operator*= (const _Expr<_Dom, _Tp>&) const;
59
+ template<class _Dom>
60
+ void operator/= (const _Expr<_Dom, _Tp>&) const;
61
+ template<class _Dom>
62
+ void operator%= (const _Expr<_Dom, _Tp>&) const;
63
+ template<class _Dom>
64
+ void operator+= (const _Expr<_Dom, _Tp>&) const;
65
+ template<class _Dom>
66
+ void operator-= (const _Expr<_Dom, _Tp>&) const;
67
+ template<class _Dom>
68
+ void operator^= (const _Expr<_Dom, _Tp>&) const;
69
+ template<class _Dom>
70
+ void operator&= (const _Expr<_Dom, _Tp>&) const;
71
+ template<class _Dom>
72
+ void operator|= (const _Expr<_Dom, _Tp>&) const;
73
+ template<class _Dom>
74
+ void operator<<= (const _Expr<_Dom, _Tp>&) const;
75
+ template<class _Dom>
76
+ void operator>>= (const _Expr<_Dom, _Tp>&) const;
77
+
78
+ private:
79
+ indirect_array (const indirect_array&);
80
+ indirect_array (_Array<_Tp>, size_t, _Array<size_t>);
81
+
82
+ friend class valarray<_Tp>;
83
+ friend class gslice_array<_Tp>;
84
+
85
+ const size_t _M_sz;
86
+ const _Array<size_t> _M_index;
87
+ const _Array<_Tp> _M_array;
88
+
89
+ // not implemented
90
+ indirect_array ();
91
+ indirect_array& operator= (const indirect_array&);
92
+ };
93
+
94
+ template<typename _Tp>
95
+ inline indirect_array<_Tp>::indirect_array(const indirect_array<_Tp>& __a)
96
+ : _M_sz (__a._M_sz), _M_index (__a._M_index),
97
+ _M_array (__a._M_array) {}
98
+
99
+ template<typename _Tp>
100
+ inline
101
+ indirect_array<_Tp>::indirect_array (_Array<_Tp> __a, size_t __s,
102
+ _Array<size_t> __i)
103
+ : _M_sz (__s), _M_index (__i), _M_array (__a) {}
104
+
105
+
106
+ template<typename _Tp>
107
+ inline void
108
+ indirect_array<_Tp>::operator= (const _Tp& __t)
109
+ { __valarray_fill(_M_array, _M_index, _M_sz, __t); }
110
+
111
+ template<typename _Tp>
112
+ inline void
113
+ indirect_array<_Tp>::operator= (const valarray<_Tp>& __v) const
114
+ { __valarray_copy (_Array<_Tp> (__v), _M_sz, _M_array, _M_index); }
115
+
116
+ template<typename _Tp>
117
+ template<class _Dom>
118
+ inline void
119
+ indirect_array<_Tp>::operator= (const _Expr<_Dom,_Tp>& __e) const
120
+ { __valarray_copy (__e, _M_sz, _M_array, _M_index); }
121
+
122
+ #undef _DEFINE_VALARRAY_OPERATOR
123
+ #define _DEFINE_VALARRAY_OPERATOR(op, name) \
124
+ template<typename _Tp> \
125
+ inline void \
126
+ indirect_array<_Tp>::operator op##= (const valarray<_Tp>& __v) const \
127
+ { \
128
+ _Array_augmented_##name (_M_array, _M_index, _Array<_Tp> (__v), _M_sz); \
129
+ } \
130
+ \
131
+ template<typename _Tp> template<class _Dom> \
132
+ inline void \
133
+ indirect_array<_Tp>::operator op##= (const _Expr<_Dom,_Tp>& __e) const \
134
+ { \
135
+ _Array_augmented_##name (_M_array, _M_index, __e, _M_sz); \
136
+ }
137
+
138
+ _DEFINE_VALARRAY_OPERATOR(*, multiplies)
139
+ _DEFINE_VALARRAY_OPERATOR(/, divides)
140
+ _DEFINE_VALARRAY_OPERATOR(%, modulus)
141
+ _DEFINE_VALARRAY_OPERATOR(+, plus)
142
+ _DEFINE_VALARRAY_OPERATOR(-, minus)
143
+ _DEFINE_VALARRAY_OPERATOR(^, xor)
144
+ _DEFINE_VALARRAY_OPERATOR(&, and)
145
+ _DEFINE_VALARRAY_OPERATOR(|, or)
146
+ _DEFINE_VALARRAY_OPERATOR(<<, shift_left)
147
+ _DEFINE_VALARRAY_OPERATOR(>>, shift_right)
148
+
149
+ #undef _DEFINE_VALARRAY_OPERATOR
150
+
151
+ } // extern "C++"
152
+
153
+ #endif // __INDIRECT_ARRAY__
154
+
155
+ // Local Variables:
156
+ // mode:c++
157
+ // End:
@@ -0,0 +1,96 @@
1
+ // The -*- C++ -*- long_double_complex class.
2
+ // Copyright (C) 1994 Free Software Foundation
3
+
4
+ // This file is part of the GNU ANSI C++ Library. This library is free
5
+ // software; you can redistribute it and/or modify it under the
6
+ // terms of the GNU General Public License as published by the
7
+ // Free Software Foundation; either version 2, or (at your option)
8
+ // any later version.
9
+
10
+ // This library is distributed in the hope that it will be useful,
11
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ // GNU General Public License for more details.
14
+
15
+ // You should have received a copy of the GNU General Public License
16
+ // along with this library; see the file COPYING. If not, write to the Free
17
+ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
+
19
+ // As a special exception, if you link this library with files
20
+ // compiled with a GNU compiler to produce an executable, this does not cause
21
+ // the resulting executable to be covered by the GNU General Public License.
22
+ // This exception does not however invalidate any other reasons why
23
+ // the executable file might be covered by the GNU General Public License.
24
+
25
+ // Written by Jason Merrill based upon the specification in the 27 May 1994
26
+ // C++ working paper, ANSI document X3J16/94-0098.
27
+
28
+ #ifndef __LDCOMPLEX__
29
+ #define __LDCOMPLEX__
30
+
31
+ #ifdef __GNUG__
32
+ #pragma interface "ldcomplex"
33
+ #endif
34
+
35
+ extern "C++" {
36
+ template <>
37
+ class complex<long double>
38
+ {
39
+ public:
40
+ complex (long double r = 0, long double i = 0): re (r), im (i) { }
41
+ complex (const complex<float>& r): re (r.real ()), im (r.imag ()) { }
42
+ complex (const complex<double>& r): re (r.real ()), im (r.imag ()) { }
43
+
44
+ complex& operator+= (const complex& r) { return __doapl (this, r); }
45
+ complex& operator-= (const complex& r) { return __doami (this, r); }
46
+ complex& operator*= (const complex& r) { return __doaml (this, r); }
47
+ complex& operator/= (const complex& r) { return __doadv (this, r); }
48
+
49
+ long double real () const { return re; }
50
+ long double imag () const { return im; }
51
+ private:
52
+ long double re, im;
53
+
54
+ friend complex& __doapl<> (complex *, const complex&);
55
+ friend complex& __doami<> (complex *, const complex&);
56
+ friend complex& __doaml<> (complex *, const complex&);
57
+ friend complex& __doadv<> (complex *, const complex&);
58
+
59
+ #ifndef __STRICT_ANSI__
60
+ friend inline complex operator + (const complex& x, long double y)
61
+ { return operator+<> (x, y); }
62
+ friend inline complex operator + (long double x, const complex& y)
63
+ { return operator+<> (x, y); }
64
+ friend inline complex operator - (const complex& x, long double y)
65
+ { return operator-<> (x, y); }
66
+ friend inline complex operator - (long double x, const complex& y)
67
+ { return operator-<> (x, y); }
68
+ friend inline complex operator * (const complex& x, long double y)
69
+ { return operator*<> (x, y); }
70
+ friend inline complex operator * (long double x, const complex& y)
71
+ { return operator*<> (x, y); }
72
+ friend inline complex operator / (const complex& x, long double y)
73
+ { return operator/<> (x, y); }
74
+ friend inline complex operator / (long double x, const complex& y)
75
+ { return operator/<> (x, y); }
76
+ friend inline bool operator == (const complex& x, long double y)
77
+ { return operator==<> (x, y); }
78
+ friend inline bool operator == (long double x, const complex& y)
79
+ { return operator==<> (x, y); }
80
+ friend inline bool operator != (const complex& x, long double y)
81
+ { return operator!=<> (x, y); }
82
+ friend inline bool operator != (long double x, const complex& y)
83
+ { return operator!=<> (x, y); }
84
+ #endif /* __STRICT_ANSI__ */
85
+ };
86
+
87
+ inline complex<float>::complex (const complex<long double>& r)
88
+ : re (r.real ()), im (r.imag ())
89
+ { }
90
+
91
+ inline complex<double>::complex (const complex<long double>& r)
92
+ : re (r.real ()), im (r.imag ())
93
+ { }
94
+ } // extern "C++"
95
+
96
+ #endif