Namespaces
Variants

std::meta::is_deleted

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

Returns true if r represents a deleted function. Otherwise returns false.

Parameters

r - a reflection value

Return value

true if r represents a deleted function; otherwise false.

Example

#include <meta>

struct Base
{
    bool operator==(const Base&) const = delete;
};

struct Derived : public Base
{
    bool operator==(const Derived&) const = default; // implicitly deleted
};

static_assert(std::meta::is_deleted(^^Base::operator==));
static_assert(std::meta::is_deleted(^^Derived::operator==));

int main() {}

See also

checks if reflection represents a function
(function) [edit]
checks if reflection represents a user-provided function
(function) [edit]