From Jason Turner

[bitwise.operations]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpwf9w7ksx/{from.md → to.md} +73 -40
tmp/tmpwf9w7ksx/{from.md → to.md} RENAMED
@@ -2,92 +2,125 @@
2
 
3
  The library provides basic function object classes for all of the
4
  bitwise operators in the language ([[expr.bit.and]], [[expr.or]],
5
  [[expr.xor]], [[expr.unary.op]]).
6
 
 
 
7
  ``` cpp
8
  template <class T = void> struct bit_and {
9
  constexpr T operator()(const T& x, const T& y) const;
10
- typedef T first_argument_type;
11
- typedef T second_argument_type;
12
- typedef T result_type;
13
  };
14
  ```
15
 
16
- `operator()` returns `x & y`.
17
-
18
- ``` cpp
19
- template <class T = void> struct bit_or {
20
- constexpr T operator()(const T& x, const T& y) const;
21
- typedef T first_argument_type;
22
- typedef T second_argument_type;
23
- typedef T result_type;
24
- };
25
- ```
26
-
27
- `operator()` returns `x | y`.
28
-
29
  ``` cpp
30
- template <class T = void> struct bit_xor {
31
  constexpr T operator()(const T& x, const T& y) const;
32
- typedef T first_argument_type;
33
- typedef T second_argument_type;
34
- typedef T result_type;
35
- };
36
- ```
37
-
38
- `operator()` returns `x ^ y`.
39
-
40
- ``` cpp
41
- template <class T = void> struct bit_not {
42
- constexpr T operator()(const T& x) const;
43
- typedef T argument_type;
44
- typedef T result_type;
45
- };
46
  ```
47
 
48
- `operator()` returns `~x`.
49
 
50
  ``` cpp
51
  template <> struct bit_and<void> {
52
  template <class T, class U> constexpr auto operator()(T&& t, U&& u) const
53
  -> decltype(std::forward<T>(t) & std::forward<U>(u));
54
 
55
- typedef unspecified is_transparent;
56
  };
57
  ```
58
 
59
- `operator()` returns `std::forward<T>(t) & std::forward<U>(u)`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
  ``` cpp
62
  template <> struct bit_or<void> {
63
  template <class T, class U> constexpr auto operator()(T&& t, U&& u) const
64
  -> decltype(std::forward<T>(t) | std::forward<U>(u));
65
 
66
- typedef unspecified is_transparent;
67
  };
68
  ```
69
 
70
- `operator()` returns `std::forward<T>(t) | std::forward<U>(u)`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
 
72
  ``` cpp
73
  template <> struct bit_xor<void> {
74
  template <class T, class U> constexpr auto operator()(T&& t, U&& u) const
75
  -> decltype(std::forward<T>(t) ^ std::forward<U>(u));
76
 
77
- typedef unspecified is_transparent;
78
  };
79
  ```
80
 
81
- `operator()` returns `std::forward<T>(t) ^ std::forward<U>(u)`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
  ``` cpp
84
  template <> struct bit_not<void> {
85
  template <class T> constexpr auto operator()(T&& t) const
86
  -> decltype(~std::forward<T>(t));
87
 
88
- typedef unspecified is_transparent;
89
  };
90
  ```
91
 
92
- `operator()` returns `~std::forward<T>(t)`.
 
 
 
 
 
93
 
 
2
 
3
  The library provides basic function object classes for all of the
4
  bitwise operators in the language ([[expr.bit.and]], [[expr.or]],
5
  [[expr.xor]], [[expr.unary.op]]).
6
 
7
+ #### Class template `bit_and` <a id="bitwise.operations.and">[[bitwise.operations.and]]</a>
8
+
9
  ``` cpp
10
  template <class T = void> struct bit_and {
11
  constexpr T operator()(const T& x, const T& y) const;
 
 
 
12
  };
13
  ```
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  ``` cpp
 
16
  constexpr T operator()(const T& x, const T& y) const;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  ```
18
 
19
+ *Returns:* `x & y`.
20
 
21
  ``` cpp
22
  template <> struct bit_and<void> {
23
  template <class T, class U> constexpr auto operator()(T&& t, U&& u) const
24
  -> decltype(std::forward<T>(t) & std::forward<U>(u));
25
 
26
+ using is_transparent = unspecified;
27
  };
28
  ```
29
 
30
+ ``` cpp
31
+ template <class T, class U> constexpr auto operator()(T&& t, U&& u) const
32
+ -> decltype(std::forward<T>(t) & std::forward<U>(u));
33
+ ```
34
+
35
+ *Returns:* `std::forward<T>(t) & std::forward<U>(u)`.
36
+
37
+ #### Class template `bit_or` <a id="bitwise.operations.or">[[bitwise.operations.or]]</a>
38
+
39
+ ``` cpp
40
+ template <class T = void> struct bit_or {
41
+ constexpr T operator()(const T& x, const T& y) const;
42
+ };
43
+ ```
44
+
45
+ ``` cpp
46
+ constexpr T operator()(const T& x, const T& y) const;
47
+ ```
48
+
49
+ *Returns:* `x | y`.
50
 
51
  ``` cpp
52
  template <> struct bit_or<void> {
53
  template <class T, class U> constexpr auto operator()(T&& t, U&& u) const
54
  -> decltype(std::forward<T>(t) | std::forward<U>(u));
55
 
56
+ using is_transparent = unspecified;
57
  };
58
  ```
59
 
60
+ ``` cpp
61
+ template <class T, class U> constexpr auto operator()(T&& t, U&& u) const
62
+ -> decltype(std::forward<T>(t) | std::forward<U>(u));
63
+ ```
64
+
65
+ *Returns:* `std::forward<T>(t) | std::forward<U>(u)`.
66
+
67
+ #### Class template `bit_xor` <a id="bitwise.operations.xor">[[bitwise.operations.xor]]</a>
68
+
69
+ ``` cpp
70
+ template <class T = void> struct bit_xor {
71
+ constexpr T operator()(const T& x, const T& y) const;
72
+ };
73
+ ```
74
+
75
+ ``` cpp
76
+ constexpr T operator()(const T& x, const T& y) const;
77
+ ```
78
+
79
+ *Returns:* `x ^ y`.
80
 
81
  ``` cpp
82
  template <> struct bit_xor<void> {
83
  template <class T, class U> constexpr auto operator()(T&& t, U&& u) const
84
  -> decltype(std::forward<T>(t) ^ std::forward<U>(u));
85
 
86
+ using is_transparent = unspecified;
87
  };
88
  ```
89
 
90
+ ``` cpp
91
+ template <class T, class U> constexpr auto operator()(T&& t, U&& u) const
92
+ -> decltype(std::forward<T>(t) ^ std::forward<U>(u));
93
+ ```
94
+
95
+ *Returns:* `std::forward<T>(t) ^ std::forward<U>(u)`.
96
+
97
+ #### Class template `bit_not` <a id="bitwise.operations.not">[[bitwise.operations.not]]</a>
98
+
99
+ ``` cpp
100
+ template <class T = void> struct bit_not {
101
+ constexpr T operator()(const T& x) const;
102
+ };
103
+ ```
104
+
105
+ ``` cpp
106
+ constexpr T operator()(const T& x) const;
107
+ ```
108
+
109
+ *Returns:* `~x`.
110
 
111
  ``` cpp
112
  template <> struct bit_not<void> {
113
  template <class T> constexpr auto operator()(T&& t) const
114
  -> decltype(~std::forward<T>(t));
115
 
116
+ using is_transparent = unspecified;
117
  };
118
  ```
119
 
120
+ ``` cpp
121
+ template <class T> constexpr auto operator()(T&&) const
122
+ -> decltype(~std::forward<T>(t));
123
+ ```
124
+
125
+ *Returns:* `~std::forward<T>(t)`.
126