Add `nodiscard` attribute to StatusCode (C++17)
this allow spotting unchecked StatusCode
s at compile time instead of at run time.
I also fixed O(250) unchecked StatusCode
s in Gaudi (in ~60 files), using the script $587.
With this we can remove StatusCodeSvc
with the overhead it implies (@graven noted that removing ~StatusCode
we will also save some time because the return will be done via registers).
This also remove the WARN_UNUSED
macro introduced with !386 (merged) (redundant).
Merge request reports
Activity
- [2018-09-26 13:38] Validation started with lhcb-gaudi-merge#590
added 2 commits
mentioned in merge request lhcb/Online!258 (merged)
mentioned in commit lhcb/LHCb@ee8427b2
mentioned in merge request lhcb/LHCb!1524 (closed)
I'd like to suggest to split this MR in two pieces:
- just the part which adds the various
.ignore()
(and which can be merged today!) - the parts which adds
[[nodiscard]]
to StatusCode (and which has to wait for C++17, and maybe until the "users" have had a change to fix the (trivial) fall-out before it gets merged)
- just the part which adds the various
mentioned in commit lhcb/Lbcom@81aa6e99
mentioned in merge request lhcb/Lbcom!281 (closed)
mentioned in commit lhcb/Boole@8a6af0d1
mentioned in merge request lhcb/Boole!173 (closed)
mentioned in commit lhcb/Boole@8f65d0a0
@graven, indeed it could be splitted. OTOH, I think is more urgent to get the
[[nodiscard]]
in, rather than a bunch of.ignore()
nobody ever notice were missing.In any case, as you may notice from the mentions, I'm already going through all LHCb projects (with my script it's pretty quick).
assigned to @leggett
mentioned in commit lhcb/Online@c80dd880
mentioned in commit lhcb/Rec@5e1c98fc
mentioned in merge request lhcb/Rec!1221 (closed)
mentioned in commit lhcb/LHCb@003a4784
mentioned in commit lhcb/Boole@becdd37a