Skip to content

add inline specifier for detail::combine - #2285

Merged
nlohmann merged 2 commits into
nlohmann:developfrom
T0b1-iOS:develop
Jul 19, 2020
Merged

nlohmann merged 2 commits into
nlohmann:developfrom
T0b1-iOS:develop

Conversation

@T0b1-iOS

@T0b1-iOS T0b1-iOS commented Jul 18, 2020 •

Copy link
Copy Markdown
Contributor

fix compiles where multiple source files include the header and generate multiple definitions of nlohmann::detail::combine by adding an inline specifier.

I hope it's okay I skipped the unit test and stuff since I would figure this literally can't break anything.

Fixes #2281.

@T0b1-iOS
T0b1-iOS requested a review from nlohmann as a code owner July 18, 2020 04:32
@nlohmann

Copy link
Copy Markdown
Owner

Thanks! Can you please also run the amalgamation?

@T0b1-iOS

T0b1-iOS commented Jul 18, 2020 •

Copy link
Copy Markdown
Contributor Author

oh, yea. Sorry, I forgot that. I hope it's fine like this.

@nlohmann

Copy link
Copy Markdown
Owner

I think we should add a regression test for this - at least something basic that consists of two translation units. But this would be out of scope of this PR.

@nlohmann nlohmann left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Looks good to me.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling 88243b3 on T0b1-iOS:develop into 43ab8a2 on nlohmann:develop.

@nlohmann nlohmann mentioned this pull request Jul 19, 2020
@nlohmann nlohmann self-assigned this Jul 19, 2020
@nlohmann nlohmann added this to the Release 3.8.1 milestone Jul 19, 2020

@nlohmann nlohmann left a comment

Copy link
Copy Markdown
Owner

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 merged commit 1fd6c58 into nlohmann:develop Jul 19, 2020
@nlohmann

Copy link
Copy Markdown
Owner

Thanks!

@nlohmann nlohmann linked an issue Jul 19, 2020 that may be closed by this pull request
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.

linker error

3 participants