diff --git a/toml/region.hpp b/toml/region.hpp index 68defa5..c87547a 100644 --- a/toml/region.hpp +++ b/toml/region.hpp @@ -498,7 +498,7 @@ inline std::string format_underline(const std::string& message, { // invalid // ~~~~~~~ - const auto underline_len = std::min(reg->size(), reg->line().size()); + const auto underline_len = (std::min)(reg->size(), reg->line().size()); retval << color::bold << color::red << make_string(underline_len, '~') << color::reset; } diff --git a/toml/serializer.hpp b/toml/serializer.hpp index 46a2b70..286c4ca 100644 --- a/toml/serializer.hpp +++ b/toml/serializer.hpp @@ -555,7 +555,7 @@ struct serializer for(const auto& item : v) { if(is_first) {is_first = false;} else {token += ',';} - token += visit(serializer(std::numeric_limits::max(), + token += visit(serializer((std::numeric_limits::max)(), this->float_prec_, true), item); } token += ']'; @@ -575,7 +575,7 @@ struct serializer if(is_first) {is_first = false;} else {token += ',';} token += format_key(kv.first); token += '='; - token += visit(serializer(std::numeric_limits::max(), + token += visit(serializer((std::numeric_limits::max)(), this->float_prec_, true), kv.second); } token += '}';