From Jason Turner

[meta.reflection.operators]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp2fec3f3p/{from.md → to.md} +86 -0
tmp/tmp2fec3f3p/{from.md → to.md} RENAMED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Operator representations <a id="meta.reflection.operators">[[meta.reflection.operators]]</a>
2
+
3
+ ``` cpp
4
+ enum class operators {
5
+ see below;
6
+ };
7
+ using enum operators;
8
+ ```
9
+
10
+ The enumeration type `operators` specifies constants used to identify
11
+ operators that can be overloaded, with the meanings listed
12
+ in  [[meta.reflection.operators]]. The values of the constants are
13
+ distinct.
14
+
15
+ **Table: Enum class `operators`** <a id="meta.reflection.operators">[meta.reflection.operators]</a>
16
+
17
+ | Constant | Corresponding *operator-function-id* | Operator symbol name |
18
+ | --------------------------- | ------------------------------------ | -------------------- |
19
+ | `op_new` | `operator new` | `new` |
20
+ | `op_delete` | `operator delete` | `delete` |
21
+ | `op_array_new` | `operator new[]` | `new[]` |
22
+ | `op_array_delete` | `operator delete[]` | `delete[]` |
23
+ | `op_co_await` | `operator co_await` | `co_await` |
24
+ | `op_parentheses` | `operator()` | `()` |
25
+ | `op_square_brackets` | `operator[]` | `[]` |
26
+ | `op_arrow` | `operator->` | `->` |
27
+ | `op_arrow_star` | `operator->*` | `->*` |
28
+ | `op_tilde` | `operator~` | `~` |
29
+ | `op_exclamation` | `operator!` | `!` |
30
+ | `op_plus` | `operator+` | `+` |
31
+ | `op_minus` | `operator-` | `-` |
32
+ | `op_star` | `operator*` | `*` |
33
+ | `op_slash` | `operator/` | `/` |
34
+ | `op_percent` | `operator%` | `%` |
35
+ | `op_caret` | `operator^` | `^` |
36
+ | `op_ampersand` | `operator&` | `&` |
37
+ | `op_equals` | `operator=` | `=` |
38
+ | `op_pipe` | `operator|` | `|` |
39
+ | `op_plus_equals` | `operator+=` | `+=` |
40
+ | `op_minus_equals` | `operator-=` | `-=` |
41
+ | `op_star_equals` | `operator*=` | `*=` |
42
+ | `op_slash_equals` | `operator/=` | `/=` |
43
+ | `op_percent_equals` | `operator%=` | `%=` |
44
+ | `op_caret_equals` | `operator^=` | `^=` |
45
+ | `op_ampersand_equals` | `operator&=` | `&=` |
46
+ | `op_pipe_equals` | `operator|=` | `|=` |
47
+ | `op_equals_equals` | `operator==` | `==` |
48
+ | `op_exclamation_equals` | `operator!=` | `!=` |
49
+ | `op_less` | `operator<` | `<` |
50
+ | `op_greater` | `operator>` | `>` |
51
+ | `op_less_equals` | `operator<=` | `<=` |
52
+ | `op_greater_equals` | `operator>=` | `>=` |
53
+ | `op_spaceship` | `operator<=>` | `<=>` |
54
+ | `op_ampersand_ampersand` | `operator&&` | `&&` |
55
+ | `op_pipe_pipe` | `operator||` | `||` |
56
+ | `op_less_less` | `operator<<` | `<<` |
57
+ | `op_greater_greater` | `operator>>` | `>>` |
58
+ | `op_less_less_equals` | `operator<<=` | `<<=` |
59
+ | `op_greater_greater_equals` | `operator>>=` | `>>=` |
60
+ | `op_plus_plus` | `operator++` | `++` |
61
+ | `op_minus_minus` | `operator--` | `--` |
62
+ | `op_comma` | `operator,` | `,` |
63
+
64
+ ``` cpp
65
+ consteval operators operator_of(info r);
66
+ ```
67
+
68
+ *Returns:* The value of the enumerator from `operators` whose
69
+ corresponding *operator-function-id* is the unqualified name of the
70
+ entity represented by `r`.
71
+
72
+ *Throws:* `meta::exception` unless `r` represents an operator function
73
+ or operator function template.
74
+
75
+ ``` cpp
76
+ consteval string_view symbol_of(operators op);
77
+ consteval u8string_view u8symbol_of(operators op);
78
+ ```
79
+
80
+ *Returns:* A `string_view` or `u8string_view` containing the characters
81
+ of the operator symbol name corresponding to `op`, respectively encoded
82
+ with the ordinary literal encoding or with UTF-8.
83
+
84
+ *Throws:* `meta::exception` unless the value of `op` corresponds to one
85
+ of the enumerators in `operators`.
86
+