Skip to content

Conversation

oold
Copy link

@oold oold commented Feb 24, 2023

The scope_guard class should be declared nodiscard as there really isn't any good reason to discard returned instances of it.

@ricab
Copy link
Owner

ricab commented Feb 28, 2023

Plus, the caller could still discard if they wanted (e.g. cast, assign to std::ignore).

Thanks @oold! I am just trying to get Github Actions back into shape first.

@codecov
Copy link

codecov bot commented Mar 1, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (bb64859) 100.00% compared to head (421fcce) 100.00%.

❗ Current head 421fcce differs from pull request most recent head d910a89. Consider uploading reports for the commit d910a89 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #26   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           15        15           
=========================================
  Hits            15        15           
Impacted Files Coverage Δ
scope_guard.hpp 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Do not treat unused-result warnings as errors in versions of gcc before
10, as they (wrongly) issued that warning in unevaluated contexts. See
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89070.
@ricab ricab merged commit ee296e1 into ricab:main Mar 1, 2023
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.

2 participants