-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
Feature/span equality operators #670
Feature/span equality operators #670
Conversation
I gave the accepted changes some thought last night and I see a problem. This may be the reason why comparisons were not included for I think that a deep comparison is more valid in that it reflects what a comparison of a container would do. A better implementation may be to first compare the pointers/size, and, if they do not match, compare the contents of the spans. |
I've updated the pulled code to do a deep comparison. |
I had the same question about doing a shallow vs. deep comparison and came to the opposite conclusion. My reasoning was just that if the underlying containers are different, the spans would be operating on different containers and would not be considered the same. Even if the data in the containers happen to be the same. I agree that both comparisons can be thought of as correct so if you think a deep compare is more valid that's good with me. |
Maybe additional explicit comparison member functions could be useful? Compare internal pointers Compare pointed to data |
Deep comparison was originally in Maybe some sort of overloaded
|
There is the question of whether 'empty' spans should compare as equal.
|
Added equals and not equals operator for spans.