rspec/rules/S5403/cfamily/comments-and-links.adoc

23 lines
1.0 KiB
Plaintext

=== is related to: S1048
=== duplicates: S5018
=== on 28 Aug 2019, 21:37:24 Loïc Joly wrote:
\[~geoffray.adde] I agree for the ``++move++`` part, but we already have RSPEC-5018 for that. I kind of agree for the swap part, but I think it would fit perfectly within RSPEC-5018 that we could just extend a little.
For constructor, I'm not so sure:
* "Creation and destruction of local variables allocated on the stack can throw": Yes, and making the default constructor noexcept will not prevent this
* "It makes that any scope should be protected by a try-catch block": I don't see why
It might be desirable that the moved-from state of an object is equivalent to the default constructed one, and for that, having a noexcept default constructor might help, but this looks more like a low priority code smell to me.
What do you think?
=== on 3 Sep 2019, 10:22:56 Loïc Joly wrote:
After discussion with [~geoffray.adde]: Ok to add swap to RPSEC-5018, and drop the default constructor part. Which means this RSPEC is no longer needed.