Skip to content
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

Allow comparing a record to another to collect the differences #90

Closed
christianparpart opened this issue Nov 12, 2024 · 1 comment · Fixed by #166
Closed

Allow comparing a record to another to collect the differences #90

christianparpart opened this issue Nov 12, 2024 · 1 comment · Fixed by #166

Comments

@christianparpart
Copy link
Member

christianparpart commented Nov 12, 2024

template <typename Record>
DifferenceView<Record> CollectDifferences(Record const& left, Record const& right) noexcept;

where DifferenceView<T> holds a reference to the old and new value of each element that has changed from left to right.

Example applications

This can be used to easily visualize a before/after state when changing a record in the table.

@Yaraslaut
Copy link
Member

Can be implemented via
contour-terminal/reflection-cpp#14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants