Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use “must” as an alternative for “shall” #501

Closed
cpplearner opened this issue May 8, 2015 · 4 comments
Closed

Do not use “must” as an alternative for “shall” #501

cpplearner opened this issue May 8, 2015 · 4 comments

Comments

@cpplearner
Copy link
Contributor

ISO standards use "shall" and not "must" to express requirements. However it seems that the current draft sometimes uses "must" to introduce a requirement.

For example, 14.2[temp.name]p4 says

When the name of a member template specialization appears after . or -> in a postfix-expression or after a nested-name-specifier in a qualified-id, and the object expression of the postfix-expression is type-dependent or the nested-name-specifier in the qualified-id refers to a dependent type, but the name is not a member of the current instantiation (14.6.2.1), the member template name must be prefixed by the keyword template. Otherwise the name is assumed to name a non-template.

If the intent is really to introduce a requirement, the verb "shall", instead of "must", should be used.

@tvaneerd
Copy link
Contributor

If the intent is really to introduce a requirement, the verb "shall", instead of "must", shouldmust be used.

:-)

@zygoloid
Copy link
Member

I agree that something should change here, but I don't think replacing 'must' with 'shall' is a complete solution. The next sentence says that the program is not ill-formed in the case where the template keyword is missing; instead, it is interpreted in a different way. It's possible that we could fix this by changing the 'must' to a 'shall' and deleting the following sentence.

We should come up with a specific proposed change here and check with CWG before applying it.

@cpplearner
Copy link
Contributor Author

[temp.name] is just an example. I noted that it's wording will be changed if CWG issue 1710 is adopted. But there are several other places that uses "must" where the verb "shall" seems more appropriate. As another example, 18.6.1.2 [new.delete.array]p12 says

Requires: If present, the std::size_t size argument must equal the size argument passed to the allocation function that returned ptr.

@jensmaurer
Copy link
Member

I would prefer to address the "must"s on a more individual basis, to ease review. We probably don't want to address "must" in notes and example, for instance. Please create individual editorial issues, one for each section with a specific issue you want to have fixed.

As an example, #493 highlights a specific issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants