From Jason Turner

[valarray.syn]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp5s74oqvw/{from.md → to.md} +87 -55
tmp/tmp5s74oqvw/{from.md → to.md} RENAMED
@@ -13,101 +13,133 @@ namespace std {
13
  template<class T> class indirect_array; // an indirected array
14
 
15
  template<class T> void swap(valarray<T>&, valarray<T>&) noexcept;
16
 
17
  template<class T> valarray<T> operator* (const valarray<T>&, const valarray<T>&);
18
- template<class T> valarray<T> operator* (const valarray<T>&, const T&);
19
- template<class T> valarray<T> operator* (const T&, const valarray<T>&);
 
 
20
 
21
  template<class T> valarray<T> operator/ (const valarray<T>&, const valarray<T>&);
22
- template<class T> valarray<T> operator/ (const valarray<T>&, const T&);
23
- template<class T> valarray<T> operator/ (const T&, const valarray<T>&);
 
 
24
 
25
  template<class T> valarray<T> operator% (const valarray<T>&, const valarray<T>&);
26
- template<class T> valarray<T> operator% (const valarray<T>&, const T&);
27
- template<class T> valarray<T> operator% (const T&, const valarray<T>&);
 
 
28
 
29
  template<class T> valarray<T> operator+ (const valarray<T>&, const valarray<T>&);
30
- template<class T> valarray<T> operator+ (const valarray<T>&, const T&);
31
- template<class T> valarray<T> operator+ (const T&, const valarray<T>&);
 
 
32
 
33
  template<class T> valarray<T> operator- (const valarray<T>&, const valarray<T>&);
34
- template<class T> valarray<T> operator- (const valarray<T>&, const T&);
35
- template<class T> valarray<T> operator- (const T&, const valarray<T>&);
 
 
36
 
37
  template<class T> valarray<T> operator^ (const valarray<T>&, const valarray<T>&);
38
- template<class T> valarray<T> operator^ (const valarray<T>&, const T&);
39
- template<class T> valarray<T> operator^ (const T&, const valarray<T>&);
 
 
40
 
41
  template<class T> valarray<T> operator& (const valarray<T>&, const valarray<T>&);
42
- template<class T> valarray<T> operator& (const valarray<T>&, const T&);
43
- template<class T> valarray<T> operator& (const T&, const valarray<T>&);
 
 
44
 
45
  template<class T> valarray<T> operator| (const valarray<T>&, const valarray<T>&);
46
- template<class T> valarray<T> operator| (const valarray<T>&, const T&);
47
- template<class T> valarray<T> operator| (const T&, const valarray<T>&);
 
 
48
 
49
  template<class T> valarray<T> operator<<(const valarray<T>&, const valarray<T>&);
50
- template<class T> valarray<T> operator<<(const valarray<T>&, const T&);
51
- template<class T> valarray<T> operator<<(const T&, const valarray<T>&);
 
 
52
 
53
  template<class T> valarray<T> operator>>(const valarray<T>&, const valarray<T>&);
54
- template<class T> valarray<T> operator>>(const valarray<T>&, const T&);
55
- template<class T> valarray<T> operator>>(const T&, const valarray<T>&);
 
 
56
 
57
  template<class T> valarray<bool> operator&&(const valarray<T>&, const valarray<T>&);
58
- template<class T> valarray<bool> operator&&(const valarray<T>&, const T&);
59
- template<class T> valarray<bool> operator&&(const T&, const valarray<T>&);
 
 
60
 
61
  template<class T> valarray<bool> operator||(const valarray<T>&, const valarray<T>&);
62
- template<class T> valarray<bool> operator||(const valarray<T>&, const T&);
63
- template<class T> valarray<bool> operator||(const T&, const valarray<T>&);
 
 
64
 
65
- template<class T>
66
- valarray<bool> operator==(const valarray<T>&, const valarray<T>&);
67
- template<class T> valarray<bool> operator==(const valarray<T>&, const T&);
68
- template<class T> valarray<bool> operator==(const T&, const valarray<T>&);
69
- template<class T>
70
- valarray<bool> operator!=(const valarray<T>&, const valarray<T>&);
71
- template<class T> valarray<bool> operator!=(const valarray<T>&, const T&);
72
- template<class T> valarray<bool> operator!=(const T&, const valarray<T>&);
 
 
73
 
74
- template<class T>
75
- valarray<bool> operator< (const valarray<T>&, const valarray<T>&);
76
- template<class T> valarray<bool> operator< (const valarray<T>&, const T&);
77
- template<class T> valarray<bool> operator< (const T&, const valarray<T>&);
78
- template<class T>
79
- valarray<bool> operator> (const valarray<T>&, const valarray<T>&);
80
- template<class T> valarray<bool> operator> (const valarray<T>&, const T&);
81
- template<class T> valarray<bool> operator> (const T&, const valarray<T>&);
82
- template<class T>
83
- valarray<bool> operator<=(const valarray<T>&, const valarray<T>&);
84
- template<class T> valarray<bool> operator<=(const valarray<T>&, const T&);
85
- template<class T> valarray<bool> operator<=(const T&, const valarray<T>&);
86
- template<class T>
87
- valarray<bool> operator>=(const valarray<T>&, const valarray<T>&);
88
- template<class T> valarray<bool> operator>=(const valarray<T>&, const T&);
89
- template<class T> valarray<bool> operator>=(const T&, const valarray<T>&);
 
 
 
 
90
 
91
  template<class T> valarray<T> abs (const valarray<T>&);
92
  template<class T> valarray<T> acos (const valarray<T>&);
93
  template<class T> valarray<T> asin (const valarray<T>&);
94
  template<class T> valarray<T> atan (const valarray<T>&);
95
 
96
  template<class T> valarray<T> atan2(const valarray<T>&, const valarray<T>&);
97
- template<class T> valarray<T> atan2(const valarray<T>&, const T&);
98
- template<class T> valarray<T> atan2(const T&, const valarray<T>&);
 
 
99
 
100
  template<class T> valarray<T> cos (const valarray<T>&);
101
  template<class T> valarray<T> cosh (const valarray<T>&);
102
  template<class T> valarray<T> exp (const valarray<T>&);
103
  template<class T> valarray<T> log (const valarray<T>&);
104
  template<class T> valarray<T> log10(const valarray<T>&);
105
 
106
  template<class T> valarray<T> pow(const valarray<T>&, const valarray<T>&);
107
- template<class T> valarray<T> pow(const valarray<T>&, const T&);
108
- template<class T> valarray<T> pow(const T&, const valarray<T>&);
109
 
110
  template<class T> valarray<T> sin (const valarray<T>&);
111
  template<class T> valarray<T> sinh (const valarray<T>&);
112
  template<class T> valarray<T> sqrt (const valarray<T>&);
113
  template<class T> valarray<T> tan (const valarray<T>&);
@@ -136,20 +168,20 @@ nested argument type.[^7]
136
 
137
  Implementations introducing such replacement types shall provide
138
  additional functions and operators as follows:
139
 
140
  - for every function taking a `const valarray<T>&` other than `begin`
141
- and `end` ([[valarray.range]]), identical functions taking the
142
  replacement types shall be added;
143
  - for every function taking two `const valarray<T>&` arguments,
144
  identical functions taking every combination of `const valarray<T>&`
145
  and replacement types shall be added.
146
 
147
  In particular, an implementation shall allow a `valarray<T>` to be
148
  constructed from such replacement types and shall allow assignments and
149
  compound assignments of such types to `valarray<T>`, `slice_array<T>`,
150
  `gslice_array<T>`, `mask_array<T>` and `indirect_array<T>` objects.
151
 
152
- These library functions are permitted to throw a `bad_alloc` (
153
- [[bad.alloc]]) exception if there are not sufficient resources available
154
  to carry out the operation. Note that the exception is not mandated.
155
 
 
13
  template<class T> class indirect_array; // an indirected array
14
 
15
  template<class T> void swap(valarray<T>&, valarray<T>&) noexcept;
16
 
17
  template<class T> valarray<T> operator* (const valarray<T>&, const valarray<T>&);
18
+ template<class T> valarray<T> operator* (const valarray<T>&,
19
+ const typename valarray<T>::value_type&);
20
+ template<class T> valarray<T> operator* (const typename valarray<T>::value_type&,
21
+ const valarray<T>&);
22
 
23
  template<class T> valarray<T> operator/ (const valarray<T>&, const valarray<T>&);
24
+ template<class T> valarray<T> operator/ (const valarray<T>&,
25
+ const typename valarray<T>::value_type&);
26
+ template<class T> valarray<T> operator/ (const typename valarray<T>::value_type&,
27
+ const valarray<T>&);
28
 
29
  template<class T> valarray<T> operator% (const valarray<T>&, const valarray<T>&);
30
+ template<class T> valarray<T> operator% (const valarray<T>&,
31
+ const typename valarray<T>::value_type&);
32
+ template<class T> valarray<T> operator% (const typename valarray<T>::value_type&,
33
+ const valarray<T>&);
34
 
35
  template<class T> valarray<T> operator+ (const valarray<T>&, const valarray<T>&);
36
+ template<class T> valarray<T> operator+ (const valarray<T>&,
37
+ const typename valarray<T>::value_type&);
38
+ template<class T> valarray<T> operator+ (const typename valarray<T>::value_type&,
39
+ const valarray<T>&);
40
 
41
  template<class T> valarray<T> operator- (const valarray<T>&, const valarray<T>&);
42
+ template<class T> valarray<T> operator- (const valarray<T>&,
43
+ const typename valarray<T>::value_type&);
44
+ template<class T> valarray<T> operator- (const typename valarray<T>::value_type&,
45
+ const valarray<T>&);
46
 
47
  template<class T> valarray<T> operator^ (const valarray<T>&, const valarray<T>&);
48
+ template<class T> valarray<T> operator^ (const valarray<T>&,
49
+ const typename valarray<T>::value_type&);
50
+ template<class T> valarray<T> operator^ (const typename valarray<T>::value_type&,
51
+ const valarray<T>&);
52
 
53
  template<class T> valarray<T> operator& (const valarray<T>&, const valarray<T>&);
54
+ template<class T> valarray<T> operator& (const valarray<T>&,
55
+ const typename valarray<T>::value_type&);
56
+ template<class T> valarray<T> operator& (const typename valarray<T>::value_type&,
57
+ const valarray<T>&);
58
 
59
  template<class T> valarray<T> operator| (const valarray<T>&, const valarray<T>&);
60
+ template<class T> valarray<T> operator| (const valarray<T>&,
61
+ const typename valarray<T>::value_type&);
62
+ template<class T> valarray<T> operator| (const typename valarray<T>::value_type&,
63
+ const valarray<T>&);
64
 
65
  template<class T> valarray<T> operator<<(const valarray<T>&, const valarray<T>&);
66
+ template<class T> valarray<T> operator<<(const valarray<T>&,
67
+ const typename valarray<T>::value_type&);
68
+ template<class T> valarray<T> operator<<(const typename valarray<T>::value_type&,
69
+ const valarray<T>&);
70
 
71
  template<class T> valarray<T> operator>>(const valarray<T>&, const valarray<T>&);
72
+ template<class T> valarray<T> operator>>(const valarray<T>&,
73
+ const typename valarray<T>::value_type&);
74
+ template<class T> valarray<T> operator>>(const typename valarray<T>::value_type&,
75
+ const valarray<T>&);
76
 
77
  template<class T> valarray<bool> operator&&(const valarray<T>&, const valarray<T>&);
78
+ template<class T> valarray<bool> operator&&(const valarray<T>&,
79
+ const typename valarray<T>::value_type&);
80
+ template<class T> valarray<bool> operator&&(const typename valarray<T>::value_type&,
81
+ const valarray<T>&);
82
 
83
  template<class T> valarray<bool> operator||(const valarray<T>&, const valarray<T>&);
84
+ template<class T> valarray<bool> operator||(const valarray<T>&,
85
+ const typename valarray<T>::value_type&);
86
+ template<class T> valarray<bool> operator||(const typename valarray<T>::value_type&,
87
+ const valarray<T>&);
88
 
89
+ template<class T> valarray<bool> operator==(const valarray<T>&, const valarray<T>&);
90
+ template<class T> valarray<bool> operator==(const valarray<T>&,
91
+ const typename valarray<T>::value_type&);
92
+ template<class T> valarray<bool> operator==(const typename valarray<T>::value_type&,
93
+ const valarray<T>&);
94
+ template<class T> valarray<bool> operator!=(const valarray<T>&, const valarray<T>&);
95
+ template<class T> valarray<bool> operator!=(const valarray<T>&,
96
+ const typename valarray<T>::value_type&);
97
+ template<class T> valarray<bool> operator!=(const typename valarray<T>::value_type&,
98
+ const valarray<T>&);
99
 
100
+ template<class T> valarray<bool> operator< (const valarray<T>&, const valarray<T>&);
101
+ template<class T> valarray<bool> operator< (const valarray<T>&,
102
+ const typename valarray<T>::value_type&);
103
+ template<class T> valarray<bool> operator< (const typename valarray<T>::value_type&,
104
+ const valarray<T>&);
105
+ template<class T> valarray<bool> operator> (const valarray<T>&, const valarray<T>&);
106
+ template<class T> valarray<bool> operator> (const valarray<T>&,
107
+ const typename valarray<T>::value_type&);
108
+ template<class T> valarray<bool> operator> (const typename valarray<T>::value_type&,
109
+ const valarray<T>&);
110
+ template<class T> valarray<bool> operator<=(const valarray<T>&, const valarray<T>&);
111
+ template<class T> valarray<bool> operator<=(const valarray<T>&,
112
+ const typename valarray<T>::value_type&);
113
+ template<class T> valarray<bool> operator<=(const typename valarray<T>::value_type&,
114
+ const valarray<T>&);
115
+ template<class T> valarray<bool> operator>=(const valarray<T>&, const valarray<T>&);
116
+ template<class T> valarray<bool> operator>=(const valarray<T>&,
117
+ const typename valarray<T>::value_type&);
118
+ template<class T> valarray<bool> operator>=(const typename valarray<T>::value_type&,
119
+ const valarray<T>&);
120
 
121
  template<class T> valarray<T> abs (const valarray<T>&);
122
  template<class T> valarray<T> acos (const valarray<T>&);
123
  template<class T> valarray<T> asin (const valarray<T>&);
124
  template<class T> valarray<T> atan (const valarray<T>&);
125
 
126
  template<class T> valarray<T> atan2(const valarray<T>&, const valarray<T>&);
127
+ template<class T> valarray<T> atan2(const valarray<T>&,
128
+ const typename valarray<T>::value_type&);
129
+ template<class T> valarray<T> atan2(const typename valarray<T>::value_type&,
130
+ const valarray<T>&);
131
 
132
  template<class T> valarray<T> cos (const valarray<T>&);
133
  template<class T> valarray<T> cosh (const valarray<T>&);
134
  template<class T> valarray<T> exp (const valarray<T>&);
135
  template<class T> valarray<T> log (const valarray<T>&);
136
  template<class T> valarray<T> log10(const valarray<T>&);
137
 
138
  template<class T> valarray<T> pow(const valarray<T>&, const valarray<T>&);
139
+ template<class T> valarray<T> pow(const valarray<T>&, const typename valarray<T>::value_type&);
140
+ template<class T> valarray<T> pow(const typename valarray<T>::value_type&, const valarray<T>&);
141
 
142
  template<class T> valarray<T> sin (const valarray<T>&);
143
  template<class T> valarray<T> sinh (const valarray<T>&);
144
  template<class T> valarray<T> sqrt (const valarray<T>&);
145
  template<class T> valarray<T> tan (const valarray<T>&);
 
168
 
169
  Implementations introducing such replacement types shall provide
170
  additional functions and operators as follows:
171
 
172
  - for every function taking a `const valarray<T>&` other than `begin`
173
+ and `end` [[valarray.range]], identical functions taking the
174
  replacement types shall be added;
175
  - for every function taking two `const valarray<T>&` arguments,
176
  identical functions taking every combination of `const valarray<T>&`
177
  and replacement types shall be added.
178
 
179
  In particular, an implementation shall allow a `valarray<T>` to be
180
  constructed from such replacement types and shall allow assignments and
181
  compound assignments of such types to `valarray<T>`, `slice_array<T>`,
182
  `gslice_array<T>`, `mask_array<T>` and `indirect_array<T>` objects.
183
 
184
+ These library functions are permitted to throw a `bad_alloc`
185
+ [[bad.alloc]] exception if there are not sufficient resources available
186
  to carry out the operation. Note that the exception is not mandated.
187