[Draft]Add copy constructor for dynamic_format_arg_store #2832
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.
The goal of this PR is to implement properly what #2432 proposed but as detected in #2653, it produced undefined behavior, and that's why it was deleted in be51ee1.
It should be noted that this functionality is needed in https://github.com/Kitware/ParaView.
dynamic_format_arg_store has the following members which need to be copied over:
detail::dynamic_arg_list dynamic_args_
std::vector<basic_format_arg> data_
std::vector<detail::named_arg_info<char_type>> named_info_
For this to work we need the following classes/structs/enums to have a copy constructor
detail::dynamic_arg_list (Done in this PR)
basic_format_arg which has the following member
detail::named_arg_info<char_type> (Default copy constructor prints correct result when iterating over, but leads to segfault)
I would like your view on what i have already implemented and how could i go about implementing the remaining copy constructors if it's possible of course.