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

[enum.copy_options] Poor wording for requirement on elements set in copy_options #1422

Closed
jwakely opened this issue Feb 3, 2017 · 2 comments
Assignees

Comments

@jwakely
Copy link
Member

jwakely commented Feb 3, 2017

[enum.copy_options] says:

Calling a library function with more than a single constant for an option group results in undefined behavior.

I don't like how this is phrased. Firstly, which library? Does it apply to any function in the standard library, e.g. std::move?

Secondly, I'd prefer if it used the term of art "is set" for bitmask elements set in a bitmask object.

This doesn't exactly roll off the tongue, but I think it's more precise:

"A value of type copy_options that is passed to a function described in subclause 27.10 shall have at most one element set from each option group."

@jwakely jwakely changed the title Poor wording for requirement about copy_options Poor wording for requirement on elements set in copy_options Feb 3, 2017
@jensmaurer jensmaurer changed the title Poor wording for requirement on elements set in copy_options [enum.copy_options] Poor wording for requirement on elements set in copy_options Feb 8, 2017
jensmaurer added a commit to jensmaurer/draft that referenced this issue Feb 8, 2017
@jensmaurer jensmaurer self-assigned this Feb 8, 2017
@timsong-cpp
Copy link
Contributor

timsong-cpp commented Feb 10, 2017

There are only two functions taking copy_options: copy and copy_file. Both of them have a similarly poorly phrased Requires: clause restating this requirement, e.g.:

Requires: At most one constant from each option group ([enum.copy_options]) is present in options.

I'd suggest dropping the offending sentence entirely from [enum.copy_options] or turning it into a non-normative note, and rewording the two Requires clauses to use the correct terms of art ("element" and "is set").

@jensmaurer
Copy link
Member

@timsong-cpp: Sounds like a good idea.

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

3 participants