
El 21/05/2025 a las 13:54, Ivan Matek via Boost escribió:
On Tue, May 20, 2025 at 2:09 AM Steven Watanabe via Boost < boost@lists.boost.org> wrote:
AMDG
On 5/19/25 1:01 PM, Ivan Matek via Boost wrote:
On Mon, May 19, 2025 at 8:27 PM Joaquin M López Muñoz via Boost < boost@lists.boost.org> wrote:
It is IDE clang-tidy warning, not sure compiler matters.
https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-inline-...
Could you please check if adding this comment to the offending lines
/* NOLINT(readability-redundant-inline-specifier) */
makes the warnings go away? If so, I'd happily accept a PR with that change. Thank you!
I am now a bit confused :) I believe warning is correct, why not change the code instead of suppressing the warning? What do you mean by correct? Warning is not false positive.
The warning does not indicate a problem in the code, and whether it is more or less readable is very subjective. It seems like a pretty pointless warning to me. Even if you care about such things, you really shouldn't be applying it to any code other than your own.
Well as I said it is not a problem since inline is just redundant.
It is redundant from the point of view of the language standard, but compilers take inline as a hint to favor inlining in optimization modes. Consider for instance: https://godbolt.org/z/dnfhYvnMK You can see that X::foo is inlined while X::bar is not. This is the original reason why those member functions in candidate Boost.Bloom are added the "inline" bit, namely, to invite compilers to inline --though, admittedly, for very short functions this is hardly going to make a difference. Joaquin M Lopez Munoz