Skip to content

Copy constructor changes semantics #5074

@mbrucher

Description

@mbrucher

Description

As far as I know, this was a known issue on gcc, but clang was OK, but this is now in clang 20. Using {} to construct the object adds an array around an original disctionary. This is IMHO a critical bug and now that gcc and clang are displaying this behavior, it should be fixed.

Reproduction steps

Just do

void Object::method(Json json)

call it with a dictionary, the new json object is now wrapped in an array.

Expected vs. actual results

The new object should not be wrapped in an array

Minimal code example

`void Object::method(Json json)`

Error messages

Compiler and operating system

clang 20, RH8

Library version

3.12

Validation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions