Functions

  • template <typename E, E V>
    bool EnumIsValid ()

    Template magic to parse __PRETTY_FUNCTION__ and detect if `V` is a valid enum val of type `E`.

    A valid enum val will result in a __PRETTY_FUNCTION__ like:

    constexpr bool escher::internal::IsValidEnum() [E = MyEnum, V = MyEnum::kValue]

    whereas an *invalid* enum val of 999 will result in a __PRETTY_FUNCTION__ like:

    constexpr bool escher::internal::IsValidEnum() [E = MyEnum, V = (MyEnum)999]

    After stripping the terminating "]/0", it iterates backward from the end until it finds something

    non-alphanumeric-or-underscore and trims that prefix. For an invalid enum, the resulting string

    view will be a number, therefore the result is false.

    Defined at line 25 of file ../../src/ui/lib/escher/util/enum_utils_internal.h

  • template <typename Eint Beginstd::size_t... Is>
    std::optional<size_t> EnumMaxElementValueHelper (std::index_sequence<Is...> )

    Defined at line 43 of file ../../src/ui/lib/escher/util/enum_utils_internal.h