value::to_bool() - sync logic with Python bool() operator e.g if 0 -> false : else -> true

This commit is contained in:
Artem Pavlenko 2024-11-13 14:00:50 +00:00
parent 4e59b4c7c3
commit 2e175a16fe

View file

@ -441,7 +441,7 @@ struct convert<value_bool>
template<typename T>
value_bool operator()(T val) const
{
return val > 0 ? true : false;
return val == 0 ? false : true;
}
};