24#ifndef MYSQL_UTILS_ENUMERATION_UTILS_H
25#define MYSQL_UTILS_ENUMERATION_UTILS_H
43template <
class Enum_t>
50template <Is_enum Enum_type>
52 using EnumValueType = std::underlying_type_t<Enum_type>;
53 return static_cast<EnumValueType
>(enum_value);
61template <Is_enum Enum_type>
68template <Is_enum Enum_type>
70 std::integral
auto value) {
true if Enum_t is an enumeration type (scoped or not).
Definition: enumeration_utils.h:44
ValueType value(const std::optional< ValueType > &v)
Definition: gtid.h:83
Definition: gtid_format.h:47
constexpr std::pair< Enum_type, Return_status > to_enumeration(std::integral auto value)
Helper function that converts value of enumeration underlying type into enumeration type constant.
Definition: enumeration_utils.h:69
constexpr Enum_type enum_max()
Template function that returns maximum valid constant that can appear in the enumeration type.
constexpr decltype(auto) to_underlying(Enum_type enum_value)
Helper function that converts enum type to underlying integer type.
Definition: enumeration_utils.h:51
Enum_type
Definition: parse_tree_column_attrs.h:926