std::meta::is_explicit - cppreference.com
From cppreference.com
consteval bool is_explicit( std::meta::info r ); |
(since C++26) | |
Returns true if r represents an explicit constructor or conversion function. Otherwise returns false.
Parameters
Return value
true if r represents a member function that is declared explicit; otherwise false.
Notes
If r does not represent a function, the result is false. In particular, the result is false if r represents a function template.
Example
#include <meta> struct A { explicit operator bool() const; template<class T> explicit(^^T == ^^void) operator T*() const; }; static_assert(std::meta::is_explicit(^^A::operator bool)); static_assert(std::meta::is_explicit(^^A::operator void*)); static_assert(!std::meta::is_explicit(^^A::operator int*));