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.