JSON for Modern C++ 3.10.4 发布,主要修复 3.10.0 版本 bug
JSON for Modern C++ 3.10.4 发布了,主要修复了 3.10.0 版本带来的两个 bug ,此次的更新内容均向后兼容。
修复 bug
- 修复版本 3.10.0 中引入的回归错误,这个错误导致了:带默认参数的显式构造函数在编译时会报错。 #3077 #3079
- 修复版本 3.10.0 中引入的回归错误,这个错误导致了:
std::find和std::remove的返回值被当成一个指针,在编译时会出错 #3081 #3082 - 修复
std::filesystem::path转换 JSON 的问题,在 3.10.3 版本之前,这种转换会导致栈溢出,3.10.3 版本在Windows 系统的编译更糟糕。 #3070 #3073
弃用函数
不建议通过初始化列表的方式将迭代器对组或指针/长度对组传递到解析函数(basic_json::parse, basic_json::accept, basic_json::sax_parse, basic_json::from_cbor, basic_json::from_msgpack, basic_json::from_ubjson, basic_json::from_bson) 。应当传递两个迭代器,例如,调用 basic_json::from_cbor(ptr, ptr+len) 而不是 basic_json::from_cbor({ptr, len})
以下函数在早期版本中已被弃用,并将在下一个主要版本( 4.0.0)中删除:
iterator_wrapper已弃用。请改用成员函数items()。- 功能
friend std::istream& operator<<(basic_json&, std::istream&)和friend std::ostream& operator>>(const basic_json&, std::ostream&)已弃用。请使用friend std::istream& operator>>(std::istream&, basic_json&)和friend operator<<(std::ostream&, const basic_json&)代替。
所有弃用都带有注释 HEDLEY_DEPRECATED_FOR