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

Consider third template parameter to configure error semantics on precondition violation #33

Closed
gnzlbg opened this issue Jan 31, 2018 · 1 comment

Comments

@gnzlbg
Copy link
Owner

gnzlbg commented Jan 31, 2018

Nicolai Josuttis wrote (talking about how to error when e.g. push_back is executed on a fixed_capacity_vector that is already full):

How about adding a third optional template argument?
With the default being to throw.
(experts are good enough experts to be able to disable overflows).
And the optional template argument should be an enum not a bool
(where we can specify that implementations may add other modes).

@gnzlbg gnzlbg changed the title Explore the possibility of adding a third template parameter to configure the error behavior when the precondition size < capacity() is violated Consider third template parameter to configure error semantics on precondition violation Jan 31, 2018
@gnzlbg
Copy link
Owner Author

gnzlbg commented Nov 12, 2018

The container semantics are sufficiently different from vector (e.g. on swap), LWG suggested that a different container type is justified. See #37 .

@gnzlbg gnzlbg closed this as completed Nov 12, 2018
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

1 participant