diff --git a/common/minja.hpp b/common/minja.hpp index 9d9a1a08faf4d..2639c15a0c738 100644 --- a/common/minja.hpp +++ b/common/minja.hpp @@ -2541,7 +2541,7 @@ inline std::shared_ptr Context::builtins() { })); globals.set("namespace", Value::callable([=](const std::shared_ptr &, ArgumentsValue & args) { auto ns = Value::object(); - args.expectArgs("namespace", {0, 0}, {0, std::numeric_limits::max()}); + args.expectArgs("namespace", {0, 0}, {0, (std::numeric_limits::max)()}); for (auto & [name, value] : args.kwargs) { ns.set(name, value); } @@ -2596,7 +2596,7 @@ inline std::shared_ptr Context::builtins() { }; // https://jinja.palletsprojects.com/en/3.0.x/templates/#jinja-filters.reject globals.set("reject", Value::callable([=](const std::shared_ptr & context, ArgumentsValue & args) { - args.expectArgs("reject", {2, std::numeric_limits::max()}, {0, 0}); + args.expectArgs("reject", {2, (std::numeric_limits::max)()}, {0, 0}); auto & items = args.args[0]; auto filter_fn = context->get(args.args[1]); if (filter_fn.is_null()) throw std::runtime_error("Undefined filter: " + args.args[1].dump()); @@ -2667,7 +2667,7 @@ inline std::shared_ptr Context::builtins() { return out; })); globals.set("selectattr", Value::callable([=](const std::shared_ptr & context, ArgumentsValue & args) { - args.expectArgs("selectattr", {2, std::numeric_limits::max()}, {0, 0}); + args.expectArgs("selectattr", {2, (std::numeric_limits::max)()}, {0, 0}); auto & items = args.args[0]; if (items.is_null()) return Value::array();