Skip to content

from_*(ptr, len) deprecation #2426

@lrasinen

Description

@lrasinen

From 3.9.1 release notes:

Passing iterator pairs or pointer/length pairs to parsing functions (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) via initializer lists is deprecated. Instead, pass the elements individually without braces.

However, the pointer/length overload is marked as deprecated at least for the from_* functions:

    JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_cbor(ptr, ptr + len))
    JSON_HEDLEY_WARN_UNUSED_RESULT
    static basic_json from_cbor(const T* ptr, std::size_t len, ...

Is this an error in the release notes or is the deprecation in error?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions