mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-17 17:58:09 +08:00
fix: avoid max
macro expansion on Windows
in numeric_limits<T>::max
This commit is contained in:
@@ -180,7 +180,7 @@ struct serializer
|
|||||||
{
|
{
|
||||||
if((std::find(s.str.cbegin(), s.str.cend(), '\n') != s.str.cend() ||
|
if((std::find(s.str.cbegin(), s.str.cend(), '\n') != s.str.cend() ||
|
||||||
std::find(s.str.cbegin(), s.str.cend(), '\"') != s.str.cend()) &&
|
std::find(s.str.cbegin(), s.str.cend(), '\"') != s.str.cend()) &&
|
||||||
this->width_ != std::numeric_limits<std::size_t>::max())
|
this->width_ != (std::numeric_limits<std::size_t>::max)())
|
||||||
{
|
{
|
||||||
// if linefeed or double-quote is contained,
|
// if linefeed or double-quote is contained,
|
||||||
// make it multiline basic string.
|
// make it multiline basic string.
|
||||||
@@ -346,7 +346,7 @@ struct serializer
|
|||||||
{
|
{
|
||||||
serializer ser(*this);
|
serializer ser(*this);
|
||||||
ser.can_be_inlined_ = true;
|
ser.can_be_inlined_ = true;
|
||||||
ser.width_ = std::numeric_limits<std::size_t>::max();
|
ser.width_ = (std::numeric_limits<std::size_t>::max)();
|
||||||
next_elem += toml::visit(ser, item);
|
next_elem += toml::visit(ser, item);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user