Skip to content

Parse from byte-vector results in compile error #2602

Closed
@std-any-emplace

Description

@std-any-emplace

This is a test-case from a larger code-base:

TEST_CASE("parse from byte-vector", "[compile-ok-3.7.3][compile-fail-3.9.1]")
{
	auto b = [](const char a_char){ return static_cast<std::byte>(a_char); };
	auto vec = std::vector{b('{'), b('}')};
	REQUIRE(nlohmann::json::parse(vec).dump() == "{}");
}

This was working with version 3.7.3. After upgrade to version 3.9.1 this fails to compile. I guess it will also fail with 3.8.0 b/c the problem may be related to the work on the InputAdapterType.

I am not sure, if it was ever intended to work before, but it did.

Which version of the library did you use?

  • latest release version 3.9.1
  • other release - please state the version: 3.7.3
  • the develop branch

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions