std::meta::is_scoped_enum_type - cppreference.com

From cppreference.com

constevalboolis_scoped_enum_type(std::meta::infor);(since C++26)Returns true if r represents a

scoped enumeration type

. Otherwise returns false.

Parameters

r - a reflection value Return value

true if r represents a scoped enumeration type; otherwise false.

Exceptions

Throws

std::meta::exception

if r does not represent a type or type alias.

Example

Run this code

#include<meta>static_assert(is_scoped_enum_type(^^int)==false);classA{};static_assert(is_scoped_enum_type(^^A)==false);enumB{self_test=is_scoped_enum_type(^^B)};static_assert(is_scoped_enum_type(^^B)==false);static_assert(!self_test);enumstructC{final,import,module};static_assert(is_scoped_enum_type(^^C)==true);enumclassD:int{pre,post,override};static_assert(is_scoped_enum_type(^^D)==true);enumclassE;static_assert(is_scoped_enum_type(^^E)==true);intmain(){}See also