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

Anymap erase and compare #540

Merged
merged 13 commits into from
Apr 16, 2021
Merged

Anymap erase and compare #540

merged 13 commits into from
Apr 16, 2021

Conversation

carneyweb
Copy link
Contributor

Added implementations of AnyMap::erase(), AnyMap::operator==(), and Any::operator==(). The implementation of Any::operator==() behaves slightly differently than the standard interface: If one of the operator==() operands contains a value whose type does not have an operator==() implementation available, the comparison fails instead of failing to compile. This is because of the implementation of Any::Holder::operator==() which fails to compile if ValueType does not support operator==(), which would disallow storing anything in an Any container that does not provide the equality operator.

@jeffdiclemente jeffdiclemente marked this pull request as draft March 31, 2021 14:30
@codecov-io
Copy link

codecov-io commented Mar 31, 2021

Codecov Report

Merging #540 (b5eeb5b) into development (8d4d743) will decrease coverage by 2.61%.
The diff coverage is 56.25%.

❗ Current head b5eeb5b differs from pull request most recent head f18f5e4. Consider uploading reports for the commit f18f5e4 to get more accurate results
Impacted file tree graph

@@               Coverage Diff               @@
##           development     #540      +/-   ##
===============================================
- Coverage        89.96%   87.35%   -2.62%     
===============================================
  Files              234       82     -152     
  Lines             9458     4506    -4952     
===============================================
- Hits              8509     3936    -4573     
+ Misses             949      570     -379     
Impacted Files Coverage Δ
framework/include/cppmicroservices/AnyMap.h 66.66% <0.00%> (ø)
framework/src/util/AnyMap.cpp 87.90% <45.45%> (+0.44%) ⬆️
framework/include/cppmicroservices/Any.h 95.74% <100.00%> (+7.84%) ⬆️
framework/src/util/SharedLibraryException.cpp 0.00% <0.00%> (-100.00%) ⬇️
framework/src/util/SharedLibrary.cpp 36.61% <0.00%> (-52.08%) ⬇️
...nclude/cppmicroservices/ServiceTrackerCustomizer.h 50.00% <0.00%> (-33.34%) ⬇️
framework/src/bundle/BundleRegistry.cpp 76.10% <0.00%> (-16.90%) ⬇️
framework/src/service/ServiceReferenceBase.cpp 88.88% <0.00%> (-8.44%) ⬇️
framework/src/bundle/BundleResourceContainer.cpp 86.66% <0.00%> (-7.46%) ⬇️
framework/src/util/LDAPProp.cpp 84.00% <0.00%> (-6.67%) ⬇️
... and 213 more

@carneyweb carneyweb marked this pull request as ready for review April 2, 2021 15:22
It turns out that you have to have a return statement that matches the return type even if the
function is never called.
@carneyweb carneyweb marked this pull request as draft April 2, 2021 15:36
Copy link
Collaborator

@pelliott-mathworks pelliott-mathworks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well crafted!

@carneyweb carneyweb marked this pull request as ready for review April 5, 2021 18:19
@carneyweb carneyweb merged commit 8f50bb1 into development Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants