Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for deserialization of STL containers of non-default constructable types (fixes #2574). #2576
Add support for deserialization of STL containers of non-default constructable types (fixes #2574). #2576
Changes from 12 commits
1e825e4
c0a8b45
1b113f7
23f462b
672e8bf
6ebf274
6278f31
6ef1614
fc8c584
fbf6df6
d7c0f15
6eb37e9
848927a
130382f
333612c
322bc99
8e79917
2b86513
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate whether you took code out of that commit? I'm asking because of licensing issues (GPLv2 vs. MIT).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at the code to see what the "proper" fix looked like. However, that requires modifying
std::pair
/std::tuple
. The code I added is more or less the same as the suggested one in the LWG defect report. Well, the logic is the same, it's not the exact same code. So I don't think there's any issue here.It's also this report that mentions that this fix is incomplete:
I don't think this is an issue, since
detail::is_constructible
is never called for e.g.std::pair<A, B> volatile
nor for a reference to it. I did not add extra specializations todetail::is_constructible
forvolatile
types or references. Currently onlystd::pair<A, B>
andstd::pair<A, B> const
are specialized. Actually, I don't think that second one will ever be used. Do you prefer I add specializations forvolatile
,const volatile
and references to all specialized types anyway (i.e. 6 extra specializations forstd::pair
andstd::tuple
each)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not what I meant. I was asking whether the code following that comment was written by yourself (and could be MIT licensed in this project) or taken from a different source - e.g., the GCC source code which would be GPLv2 licensed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No no, as I mentioned the code I added uses the same logic as the suggested solution mentioned in the LWG defect report. No code was copied from anywhere.
Maybe I should just remove the mention to the GCC commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please. Comments like this make FOSS auditors anxious...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something to keep in mind next time 😄. I've removed the sentence and just pushed it. I guess that's the last required change then?