std::meta::is_special_member_function - cppreference.com
Namespaces
Variants

std::meta::is_special_member_function

From cppreference.com
< cpp | meta
 
 
 
Reflection library
 
Reflection types and queries
Type properties
Type property queries
 
Defined in header <meta>
consteval bool is_special_member_function( std::meta::info r );
(since C++26)

Returns true if r represents a special member function (that is either, a default/copy/move constructor, a copy/move assignment operator or a (possibly prospective) destructor). Otherwise returns false.

Parameters

r - a reflection value

Return value

true if r represents a special member function; otherwise false.

Example

#include <meta>

struct S
{
    ~S();
    operator int();
    S& operator()(int);
};

static_assert(is_special_member_function(^^S::~S));
static_assert(!is_special_member_function(^^S::operator int));
static_assert(!is_special_member_function(^^S::operator()));

int main() {}

See also