[ Web Proxy ]
URL:
Viewing: https://cppreference.com/cpp/meta/is_special_member_function [Back]  [Original]

std::meta::is_special_member_function - cppreference.com
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

checks if reflection represents a function
(function) [edit]
checks if reflection represents a conversion function
(function) [edit]
checks if the reflected entity is a constructor of this kind
(function) [edit]
checks if the reflected entity is a destructor
(function) [edit]
checks if the reflected entity is an assignment operator of this kind
(function) [edit]

Web Proxy Viewer  |  New URL  |  Original Page