15enum class ExpressionType : uint8_t {
34struct std::formatter<slp::ExpressionType> {
39 constexpr auto parse(std::format_parse_context& ctx) {
40 return m_underlying.parse(ctx);
49 template <
typename FmtContext>
50 auto format(
const slp::ExpressionType& type, FmtContext& ctx)
const {
51 using enum slp::ExpressionType;
55 return m_underlying.format(
"none", ctx);
57 return m_underlying.format(
"constant", ctx);
59 return m_underlying.format(
"parameter", ctx);
61 return m_underlying.format(
"linear", ctx);
63 return m_underlying.format(
"quadratic", ctx);
65 return m_underlying.format(
"nonlinear", ctx);
72 std::formatter<const char*> m_underlying;