-
Notifications
You must be signed in to change notification settings - Fork 10
Safer product_query construction
#205
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
base: main
Are you sure you want to change the base?
Safer product_query construction
#205
Conversation
product_query construction.product_query construction
|
@wlav, this PR should help avoid the problem you ran into. Alas, the default This is not an urgent PR. |
f8999e2 to
3bb9231
Compare
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #205 +/- ##
==========================================
+ Coverage 76.61% 76.71% +0.09%
==========================================
Files 124 124
Lines 2733 2727 -6
Branches 475 475
==========================================
- Hits 2094 2092 -2
+ Misses 446 442 -4
Partials 193 193
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
3bb9231 to
274bd88
Compare
Also switch to using default comparisons
274bd88 to
16a9c43
Compare
beojan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't see any issues.
|
|
||
| auto const& spec() const noexcept { return spec_; } | ||
| auto const& layer() const noexcept { return layer_; } | ||
| void set_type(experimental::type_id&& type) { spec_.set_type(std::move(type)); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need the std::move here, it's already an rvalue reference.
Either default-construct
product_queryor require the constructor with both theproduct_specificationand thelayerargument.Also switch to using default comparisons