Unify ReadFieldNew / ReadFieldUpdate #31
Merged
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.
Replace with ReadField wrapper and CustomReadField hook to be consistent with
BuildField / CustomBuildField. This
Makes it more straightforward pass custom types with symmetric
CustomReadField / CustomBuildField overloads
Simplifies debugging and overload resolution, removing hacks that allowed
ReadFieldNew calls to forward to ReadFieldUpdate calls and vice versa
Enables more flexibility and efficiency within CustomReadField
implementations allowing emplacing or updating in the same function based on
which is simpler or more efficient. Removes a lot of std::enable_if overload
hacks
Should allow clientInvoke to use RVO and construct return values in place
instead of copying or moving. This will allow more types to be for supported
as IPC return values even if they don't support default construction,
copying, or moving.
Improves separation of concerns, avoids need for ReadField callers to know
whether callee will emplace or update, avoids need for emplace ReadDest
object to have hardcoded support for map, vector, optional, shared_ptr,
reference_wrapper types, so they now are implemented the same as any other
custom type.