std::meta::is_operator_function
Defined in header <meta> | ||
|---|---|---|
consteval bool is_operator_function( std::meta::info r ); | (since C++26) |
Returns true if r represents a function that is an operator function (operator overload). Otherwise returns false.
Parameters
| r | - | a reflection value |
Return value
true if r represents an operator function; otherwise false.
Example
#include <meta>
struct S
{
void foo();
operator int();
S& operator()(int);
};
static_assert(!is_operator_function(^^S::foo));
static_assert(!is_operator_function(^^S::operator int));
static_assert(is_operator_function(^^S::operator()));
int main() {}
See also
|
(C++26) | checks if reflection represents a function (function) |
|
(C++26) | checks if reflection represents a conversion function (function) |
|
(C++26) | checks if reflected entity is an operator function template (function) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/meta/is_operator_function