close
Skip to content

Use swap() by ADL#3609

Merged
nlohmann merged 3 commits into
nlohmann:developfrom
falbrechtskirchinger:adl-swap
Jul 28, 2022
Merged

Use swap() by ADL#3609
nlohmann merged 3 commits into
nlohmann:developfrom
falbrechtskirchinger:adl-swap

Conversation

@falbrechtskirchinger
Copy link
Copy Markdown
Contributor

Bring std::swap into scope and call swap() to allow for argument-dependent lookup when using non-std containers.

Comment thread include/nlohmann/json.hpp
Copy link
Copy Markdown
Contributor

@gregmarr gregmarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a minor suggestion on related error messages, could definitely be a separate PR.

@coveralls
Copy link
Copy Markdown

coveralls commented Jul 25, 2022

Coverage Status

Coverage remained the same at 100.0% when pulling 1b0abfc on falbrechtskirchinger:adl-swap into 2d48a4d on nlohmann:develop.

Copy link
Copy Markdown
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@nlohmann nlohmann self-assigned this Jul 28, 2022
@nlohmann nlohmann added this to the Release 3.11.0 milestone Jul 28, 2022
@nlohmann nlohmann merged commit a714381 into nlohmann:develop Jul 28, 2022
@falbrechtskirchinger falbrechtskirchinger deleted the adl-swap branch July 28, 2022 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants