You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These two deleted functions don't make sense indeed and they look suspicious - looks like someone tried to make A noncopyable.
The root of the problem is that A still remains copyable, which might be bugproned.
In my opinion it's easy to make such typo in the code, especially if you are following guideline that orders you to always use auto everywhere it's possible.
Suppose we need a check that will automatically provide the fix for the code above:
In C++20 mode it becomes possible to use
auto
in a function parameter declaration, so thus it's possible to write strange code like this:These two deleted functions don't make sense indeed and they look suspicious - looks like someone tried to make
A
noncopyable.The root of the problem is that
A
still remains copyable, which might be bugproned.In my opinion it's easy to make such typo in the code, especially if you are following guideline that orders you to always use
auto
everywhere it's possible.Suppose we need a check that will automatically provide the fix for the code above:
The text was updated successfully, but these errors were encountered: