6.3 KiB
[meta.reflection.operators]
21 Metaprogramming library [meta]
21.4 Reflection [meta.reflection]
21.4.5 Operator representations [meta.reflection.operators]
enum class [operators](#lib:operators "21.4.5 Operator representations [meta.reflection.operators]") { see below; }; using enum operators;
The enumeration type operators specifies constants used to identify operators that can be overloaded, with the meanings listed in Table 63.
The values of the constants are distinct.
Table 63 — Enum class operators [tab:meta.reflection.operators]
| ð Constant |
Corresponding operator-function-id | Operator symbol name |
|---|---|---|
| ð op_new |
operator new | new |
| ð op_delete |
operator delete | delete |
| ð op_array_new |
operator new[] | new[] |
| ð op_array_delete |
operator delete[] | delete[] |
| ð op_co_await |
operator co_await | co_await |
| ð op_parentheses |
operator() | () |
| ð op_square_brackets |
operator[] | [] |
| ð op_arrow |
operator-> | -> |
| ð op_arrow_star |
operator->* | ->* |
| ð op_tilde |
operator~ | ~ |
| ð op_exclamation |
operator! | ! |
| ð op_plus |
operator+ | + |
| ð op_minus |
operator- | - |
| ð op_star |
operator* | * |
| ð op_slash |
operator/ | / |
| ð op_percent |
operator% | % |
| ð op_caret |
operator^ | ^ |
| ð op_ampersand |
operator& | & |
| ð op_equals |
operator= | = |
| ð op_pipe |
operator | |
| ð op_plus_equals |
operator+= | += |
| ð op_minus_equals |
operator-= | -= |
| ð op_star_equals |
operator*= | *= |
| ð op_slash_equals |
operator/= | /= |
| ð op_percent_equals |
operator%= | %= |
| ð op_caret_equals |
operator^= | ^= |
| ð op_ampersand_equals |
operator&= | &= |
| ð op_pipe_equals |
operator | = |
| ð op_equals_equals |
operator== | == |
| ð op_exclamation_equals |
operator!= | != |
| ð op_less |
operator< | < |
| ð op_greater |
operator> | > |
| ð op_less_equals |
operator<= | <= |
| ð op_greater_equals |
operator>= | >= |
| ð op_spaceship |
operator<=> | <=> |
| ð op_ampersand_ampersand |
operator&& | && |
| ð op_pipe_pipe |
operator | |
| ð op_less_less |
operator<< | << |
| ð op_greater_greater |
operator>> | >> |
| ð op_less_less_equals |
operator<<= | <<= |
| ð op_greater_greater_equals |
operator>>= | >>= |
| ð op_plus_plus |
operator++ | ++ |
| ð op_minus_minus |
operator-- | -- |
| ð op_comma |
operator, | , |
consteval operators operator_of(info r);
Returns: The value of the enumerator from operators whose corresponding operator-function-id is the unqualified name of the entity represented by r.
Throws: meta::exception unlessr represents an operator function or operator function template.
consteval string_view symbol_of(operators op); consteval u8string_view u8symbol_of(operators op);
Returns: A string_view or u8string_view containing the characters of the operator symbol name corresponding to op, respectively encoded with the ordinary literal encoding or with UTF-8.
Throws: meta::exception unless the value of op corresponds to one of the enumerators in operators.