Skip to content

NLOHMANN_JSON_SERIALIZE_ENUM macro capture's json objects by value #1822

Description

@AnthonyVH

The NLOHMANN_JSON_SERIALIZE_ENUM macro (more specifically the from_json function defined by it), captures a json argument by value.

The specific lambda capture I'm talking about is in detail/macro_scope.hpp, line 100.

This copy can be (micro-)optimized away by capturing by reference instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions