Created on 2013-01-17.00:00:00 last changed 130 months ago
Proposed resolution:
This wording is relative to N3485.
Change [string.cons]/6 as indicated:
basic_string(const charT* s, size_type n, const Allocator& a = Allocator());-6- Requires: s
shall not be a null pointer and n < npospoints to an array of at least n elements of charT.
Change [string.cons]/8 as indicated:
basic_string(const charT* s, const Allocator& a = Allocator());-8- Requires: s
shall not be a null pointerpoints to an array of at least traits::length(s) + 1 elements of charT.
[ 2013-09-29, Bristol ]
Apply to the Working Paper
[ 2013-04-18, Bristol ]
Move to Ready
[ 2013-03-15 Issues Teleconference ]
Moved to Review.
The resolution could be worded more cleanly, and there is some concern about redundancy between Requirements and Effects clauses. Consensus that we do want to say something like this for the Requirements though.
In [string.cons], I believe tighter requirements should be imposed on basic_string's constructors taking an s argument (or, a behavior should be provided for the undefined cases). These requirements are properly stated in the other members functions taking s arguments (append, assign, insert,...).
basic_string(const charT* s, size_type n, const Allocator& a = Allocator());
Relative to N3485, [string.cons]/6 says "Requires: s shall not be a null pointer and n < npos", where it should say: "Requires: s points to an array of at least n elements of charT"
basic_string(const charT* s, const Allocator& a = Allocator());
[string.cons]/8 says "Requires: s shall not be a null pointer.", where it should say: "Requires: s points to an array of at least traits::length(s) + 1 elements of charT"
Daniel:
I think that [res.on.arguments] p1 b2 basically requires this already, but the wording is indeed worth improving it.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-02-20 13:20:35 | admin | set | status: wp -> c++14 |
2013-09-29 10:16:57 | admin | set | messages: + msg6652 |
2013-09-29 10:16:57 | admin | set | status: voting -> wp |
2013-09-23 13:24:31 | admin | set | status: ready -> voting |
2013-04-18 22:58:13 | admin | set | messages: + msg6467 |
2013-04-18 22:58:13 | admin | set | status: review -> ready |
2013-03-18 14:33:00 | admin | set | messages: + msg6443 |
2013-03-18 13:02:36 | admin | set | status: new -> review |
2013-03-12 20:31:03 | admin | set | messages: + msg6381 |
2013-01-17 00:00:00 | admin | create |