underlying-enum.patch 618 B

12345678910111213141516
  1. --- contrib/libs/fmt/include/fmt/format.h (index)
  2. +++ contrib/libs/fmt/include/fmt/format.h (working tree)
  3. @@ -3087,6 +3087,13 @@ FMT_INLINE auto format_to(OutputIt out, const Locale& loc,
  4. return vformat_to(out, loc, fmt, fmt::make_format_args(args...));
  5. }
  6. +// TODO(dakovalkov): Remove after updating fmtlib to newer version.
  7. +// https://github.com/fmtlib/fmt/blob/6e6eb63770a8f69bba48d079fb0f43f036d6b543/include/fmt/format.h#L4269
  8. +template <typename Enum>
  9. +constexpr auto underlying(Enum e) noexcept {
  10. + return static_cast<std::underlying_type_t<Enum>>(e);
  11. +}
  12. +
  13. FMT_MODULE_EXPORT_END
  14. FMT_END_NAMESPACE