21 Metaprogramming library [meta]

21.4 Reflection [meta.reflection]

21.4.4 Operator representations [meta.reflection.operators]

enum class 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 classoperators[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);
Constant When: r represents an operator function or operator function template.
Returns: The value of the enumerator from the operators whose corresponding operator-function-id is the unqualified name of the entity represented by r.
consteval string_view symbol_of(operators op); consteval u8string_view u8symbol_of(operators op);
Constant When: The value of op corresponds to one of the enumerators in operators.
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.