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

[any.class]/3 Rephrase example #1360

Closed
Eelis opened this issue Jan 13, 2017 · 3 comments
Closed

[any.class]/3 Rephrase example #1360

Eelis opened this issue Jan 13, 2017 · 3 comments
Assignees

Comments

@Eelis
Copy link
Contributor

Eelis commented Jan 13, 2017

[any.class]/3 reads:

Implementations should avoid the use of dynamically allocated memory for a small contained object. [ Example: where the object constructed is holding only an int.  — end example ] Such small-object optimization shall only be applied to types T for which is_­nothrow_­move_­constructible_­v is true.

Grammar-wise the phrasing of the example is not ideal.

@jwakely
Copy link
Member

jwakely commented Jan 13, 2017

How about ...

Implementations should avoid the use of dynamically allocated memory for a small contained object. [ Example: Where the object constructed is holding only an int it could be stored in an internal buffer, not in separately-allocated memory.  — end example ] Any such small-object optimization shall only be applied to types T for which is_nothrow_­move_­constructible_­v is true.

@tkoeppe
Copy link
Contributor

tkoeppe commented Jan 13, 2017

Maybe put "small-object optimization" in quotation marks?

@jensmaurer
Copy link
Member

In normative text? No thanks.

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