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

[vector.cons]/1 should say noexcept #2178

Closed
StephanTLavavej opened this issue Jun 13, 2018 · 3 comments · Fixed by #2182
Closed

[vector.cons]/1 should say noexcept #2178

StephanTLavavej opened this issue Jun 13, 2018 · 3 comments · Fixed by #2182
Assignees
Labels
tiny An issue with a small change; with "cwg" label: can be applied editorially after CWG consent.

Comments

@StephanTLavavej
Copy link
Contributor

N4750 26.3.11.2 [vector.cons]/1 defines:

explicit vector(const Allocator&);

But 26.3.11.1 [vector.overview] declared:

explicit vector(const Allocator&) noexcept;

@liuziangexit
Copy link

I thought that only move constructors need noexcept...

@jensmaurer
Copy link
Member

jensmaurer commented Jun 14, 2018

This change added noexcept in the synopsis:

commit 6e3b46f
Author: Richard Smith richard@metafoo.co.uk
Date: Mon Nov 10 17:23:30 2014 -0800

N4258 Cleaning‐up noexcept in the Library

[unord.set.overview], [unord.multiset.overview]: Replace meaningless "Container_move_assign" with the intended "Pred".

I believe the intent of that paper was clear: make the named std::vector constructor noexcept, so fixing this seems editorial to me.

@jensmaurer
Copy link
Member

jensmaurer commented Jun 14, 2018

(I notice that the partial specialization for vector<bool, Allocator> does not have the various noexcept fixes in the constructors.)

@jensmaurer jensmaurer self-assigned this Jun 14, 2018
@jensmaurer jensmaurer added the tiny An issue with a small change; with "cwg" label: can be applied editorially after CWG consent. label Jun 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tiny An issue with a small change; with "cwg" label: can be applied editorially after CWG consent.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants