From Jason Turner

[valarray.comparison]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpigjlm7ow/{from.md → to.md} +49 -42
tmp/tmpigjlm7ow/{from.md → to.md} RENAMED
@@ -1,60 +1,67 @@
1
- #### `valarray` logical operators <a id="valarray.comparison">[[valarray.comparison]]</a>
2
 
3
  ``` cpp
4
- template<class T> valarray<bool> operator==
5
- (const valarray<T>&, const valarray<T>&);
6
- template<class T> valarray<bool> operator!=
7
- (const valarray<T>&, const valarray<T>&);
8
- template<class T> valarray<bool> operator<
9
- (const valarray<T>&, const valarray<T>&);
10
- template<class T> valarray<bool> operator>
11
- (const valarray<T>&, const valarray<T>&);
12
- template<class T> valarray<bool> operator<=
13
- (const valarray<T>&, const valarray<T>&);
14
- template<class T> valarray<bool> operator>=
15
- (const valarray<T>&, const valarray<T>&);
16
- template<class T> valarray<bool> operator&&
17
- (const valarray<T>&, const valarray<T>&);
18
- template<class T> valarray<bool> operator||
19
- (const valarray<T>&, const valarray<T>&);
20
  ```
21
 
22
- *Requires:* Each of these operators may only be instantiated for a type
23
- `T` to which the indicated operator can be applied and for which the
24
- indicated operator returns a value which is of type `bool` or which can
25
- be unambiguously implicitly converted to type `bool`. The two array
26
- arguments have the same length.
27
 
28
  *Returns:* A `valarray<bool>` whose length is equal to the length of the
29
  array arguments. Each element of the returned array is initialized with
30
  the result of applying the indicated operator to the corresponding
31
  elements of the argument arrays.
32
 
33
  ``` cpp
34
- template<class T> valarray<bool> operator==(const valarray<T>&, const T&);
35
- template<class T> valarray<bool> operator==(const T&, const valarray<T>&);
36
- template<class T> valarray<bool> operator!=(const valarray<T>&, const T&);
37
- template<class T> valarray<bool> operator!=(const T&, const valarray<T>&);
38
- template<class T> valarray<bool> operator< (const valarray<T>&, const T&);
39
- template<class T> valarray<bool> operator< (const T&, const valarray<T>&);
40
- template<class T> valarray<bool> operator> (const valarray<T>&, const T&);
41
- template<class T> valarray<bool> operator> (const T&, const valarray<T>&);
42
- template<class T> valarray<bool> operator<=(const valarray<T>&, const T&);
43
- template<class T> valarray<bool> operator<=(const T&, const valarray<T>&);
44
- template<class T> valarray<bool> operator>=(const valarray<T>&, const T&);
45
- template<class T> valarray<bool> operator>=(const T&, const valarray<T>&);
46
- template<class T> valarray<bool> operator&&(const valarray<T>&, const T&);
47
- template<class T> valarray<bool> operator&&(const T&, const valarray<T>&);
48
- template<class T> valarray<bool> operator||(const valarray<T>&, const T&);
49
- template<class T> valarray<bool> operator||(const T&, const valarray<T>&);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  ```
51
 
52
- *Requires:* Each of these operators may only be instantiated for a type
53
- `T` to which the indicated operator can be applied and for which the
54
- indicated operator returns a value which is of type `bool` or which can
55
- be unambiguously implicitly converted to type `bool`.
56
 
57
  *Returns:* A `valarray<bool>` whose length is equal to the length of the
58
  array argument. Each element of the returned array is initialized with
59
  the result of applying the indicated operator to the corresponding
60
  element of the array and the non-array argument.
 
1
+ #### Logical operators <a id="valarray.comparison">[[valarray.comparison]]</a>
2
 
3
  ``` cpp
4
+ template<class T> valarray<bool> operator==(const valarray<T>&, const valarray<T>&);
5
+ template<class T> valarray<bool> operator!=(const valarray<T>&, const valarray<T>&);
6
+ template<class T> valarray<bool> operator< (const valarray<T>&, const valarray<T>&);
7
+ template<class T> valarray<bool> operator> (const valarray<T>&, const valarray<T>&);
8
+ template<class T> valarray<bool> operator<=(const valarray<T>&, const valarray<T>&);
9
+ template<class T> valarray<bool> operator>=(const valarray<T>&, const valarray<T>&);
10
+ template<class T> valarray<bool> operator&&(const valarray<T>&, const valarray<T>&);
11
+ template<class T> valarray<bool> operator||(const valarray<T>&, const valarray<T>&);
 
 
 
 
 
 
 
 
12
  ```
13
 
14
+ *Mandates:* The indicated operator can be applied to operands of type
15
+ `T` and returns a value of type `bool` or which can be unambiguously
16
+ implicitly converted to `bool`.
17
+
18
+ *Preconditions:* The two array arguments have the same length.
19
 
20
  *Returns:* A `valarray<bool>` whose length is equal to the length of the
21
  array arguments. Each element of the returned array is initialized with
22
  the result of applying the indicated operator to the corresponding
23
  elements of the argument arrays.
24
 
25
  ``` cpp
26
+ template<class T> valarray<bool> operator==(const valarray<T>&,
27
+ const typename valarray<T>::value_type&);
28
+ template<class T> valarray<bool> operator==(const typename valarray<T>::value_type&,
29
+ const valarray<T>&);
30
+ template<class T> valarray<bool> operator!=(const valarray<T>&,
31
+ const typename valarray<T>::value_type&);
32
+ template<class T> valarray<bool> operator!=(const typename valarray<T>::value_type&,
33
+ const valarray<T>&);
34
+ template<class T> valarray<bool> operator< (const valarray<T>&,
35
+ const typename valarray<T>::value_type&);
36
+ template<class T> valarray<bool> operator< (const typename valarray<T>::value_type&,
37
+ const valarray<T>&);
38
+ template<class T> valarray<bool> operator> (const valarray<T>&,
39
+ const typename valarray<T>::value_type&);
40
+ template<class T> valarray<bool> operator> (const typename valarray<T>::value_type&,
41
+ const valarray<T>&);
42
+ template<class T> valarray<bool> operator<=(const valarray<T>&,
43
+ const typename valarray<T>::value_type&);
44
+ template<class T> valarray<bool> operator<=(const typename valarray<T>::value_type&,
45
+ const valarray<T>&);
46
+ template<class T> valarray<bool> operator>=(const valarray<T>&,
47
+ const typename valarray<T>::value_type&);
48
+ template<class T> valarray<bool> operator>=(const typename valarray<T>::value_type&,
49
+ const valarray<T>&);
50
+ template<class T> valarray<bool> operator&&(const valarray<T>&,
51
+ const typename valarray<T>::value_type&);
52
+ template<class T> valarray<bool> operator&&(const typename valarray<T>::value_type&,
53
+ const valarray<T>&);
54
+ template<class T> valarray<bool> operator||(const valarray<T>&,
55
+ const typename valarray<T>::value_type&);
56
+ template<class T> valarray<bool> operator||(const typename valarray<T>::value_type&,
57
+ const valarray<T>&);
58
  ```
59
 
60
+ *Mandates:* The indicated operator can be applied to operands of type
61
+ `T` and returns a value of type `bool` or which can be unambiguously
62
+ implicitly converted to `bool`.
 
63
 
64
  *Returns:* A `valarray<bool>` whose length is equal to the length of the
65
  array argument. Each element of the returned array is initialized with
66
  the result of applying the indicated operator to the corresponding
67
  element of the array and the non-array argument.