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
// If any of the following five special member functions are not
// public, inline or defaulted, then all five of them should be
// explicitly declared (see rule of five).
To me this is a strange way to word it (not as easy to reason about as many other definitions), and although I'm probably missing something, I don't see how inline fits in. The wording also seems incorrectly inverted in my current reading.
@nliber can you please weigh in here? Is the current wording correct, and any opposition to rewording this to be more like the following?
If any of the following five special member functions are defined or declared as either defaulted or deleted, then all five of them should be explicitly declared (see rule of five).
The text was updated successfully, but these errors were encountered:
I am planning on saying something, but didn't get to it before leaving for the WG21 Meeting. :-(. I'm waiting for a brief moment to write something coherent, but so far the WG21 meeting is all-consuming...
As stated in the spec, the rule is not correct. If one declares any of the five, then we get the complicated rules of which special member functions are implicitly generated and which ones are not (which is what the Rule of Five is trying to avoid).
@mkinsner I would shorten your proposed wording to:
If any of the following five special member functions are declared, then all five of them should be explicitly declared (see rule of five).
The spec describes the rule of five as:
To me this is a strange way to word it (not as easy to reason about as many other definitions), and although I'm probably missing something, I don't see how inline fits in. The wording also seems incorrectly inverted in my current reading.
@nliber can you please weigh in here? Is the current wording correct, and any opposition to rewording this to be more like the following?
The text was updated successfully, but these errors were encountered: