-
Notifications
You must be signed in to change notification settings - Fork 871
noexcept requirement ScopeGuard #14713
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
Changes from all commits
2e2c4b8
328b37c
4500aa5
de61b57
373ae6f
fcf14de
5e82ac5
58dbc5b
81e22bb
2d9f7cf
2226cc6
821243e
ac65eee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -515,7 +515,7 @@ void lateDocumentMaterializationArangoSearchRule(Optimizer* opt, | |
| std::unique_ptr<ExecutionPlan> plan, | ||
| OptimizerRule const& rule) { | ||
| auto modified = false; | ||
| auto const addPlan = arangodb::scopeGuard([opt, &plan, &rule, &modified]() { | ||
| auto const addPlan = arangodb::scopeGuard([opt, &plan, &rule, &modified]() noexcept { | ||
| opt->addPlan(std::move(plan), rule, modified); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@maierlars, @mpoeter and I have discussed that this would best be done with another kind of scope guard that works like https://en.cppreference.com/w/cpp/experimental/scope_success. We can also mimick the previous behavior by wrapping this into a try/catch, which is not quite correct though. But IMO this PR doesn't have to fix all places that used the old ScopeGuard incorrectly, as long as we make sure to fix them afterwards.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree! Perhaps we should add comments to mark these places so we can easily find and fix them latter. |
||
| }); | ||
| // arangosearch view node supports late materialization | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,7 +91,7 @@ void arangodb::aql::lateDocumentMaterializationRule(Optimizer* opt, | |
| std::unique_ptr<ExecutionPlan> plan, | ||
| OptimizerRule const& rule) { | ||
| auto modified = false; | ||
| auto const addPlan = arangodb::scopeGuard([opt, &plan, &rule, &modified]() { | ||
| auto const addPlan = arangodb::scopeGuard([opt, &plan, &rule, &modified]() noexcept { | ||
| opt->addPlan(std::move(plan), rule, modified); | ||
| }); | ||
|
Comment on lines
-94
to
96
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as my comment in arangod/Aql/IResearchViewOptimizerRules.cpp |
||
| // index node supports late materialization | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.