public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/101411] New: missing constraint in std::as_writable_bytes
@ 2021-07-11 7:26 hewillk at gmail dot com
2021-07-12 17:36 ` [Bug libstdc++/101411] " cvs-commit at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: hewillk at gmail dot com @ 2021-07-11 7:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101411
Bug ID: 101411
Summary: missing constraint in std::as_writable_bytes
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
The standard specifies in [views#span.objectrep-2]: "Constraints:
is_const_v<ElementType> is false."
#include <span>
int main() {
std::as_writable_bytes(std::span<const int>{});
}
https://godbolt.org/z/orGxfTove
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/101411] missing constraint in std::as_writable_bytes
2021-07-11 7:26 [Bug libstdc++/101411] New: missing constraint in std::as_writable_bytes hewillk at gmail dot com
@ 2021-07-12 17:36 ` cvs-commit at gcc dot gnu.org
2021-07-12 17:37 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-12 17:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101411
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:9d4393af9d2b37b78eb5b1f84f5d4da3a6f7fba6
commit r12-2257-g9d4393af9d2b37b78eb5b1f84f5d4da3a6f7fba6
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Mon Jul 12 16:09:34 2021 +0100
libstdc++: Constrain std::as_writable_bytes [PR101411]
The std::as_writable_bytes function should be constrained to only accept
writable spans. Currently it can be called but then gives an error in
the function body.
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
PR libstdc++/101411
* include/std/span (as_writable_bytes): Add requires-clause.
* testsuite/23_containers/span/101411.cc: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/101411] missing constraint in std::as_writable_bytes
2021-07-11 7:26 [Bug libstdc++/101411] New: missing constraint in std::as_writable_bytes hewillk at gmail dot com
2021-07-12 17:36 ` [Bug libstdc++/101411] " cvs-commit at gcc dot gnu.org
@ 2021-07-12 17:37 ` redi at gcc dot gnu.org
2021-07-14 14:59 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2021-07-12 17:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101411
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-07-12
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
Target Milestone|--- |10.4
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed on trunk so far.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/101411] missing constraint in std::as_writable_bytes
2021-07-11 7:26 [Bug libstdc++/101411] New: missing constraint in std::as_writable_bytes hewillk at gmail dot com
2021-07-12 17:36 ` [Bug libstdc++/101411] " cvs-commit at gcc dot gnu.org
2021-07-12 17:37 ` redi at gcc dot gnu.org
@ 2021-07-14 14:59 ` cvs-commit at gcc dot gnu.org
2021-07-14 16:04 ` cvs-commit at gcc dot gnu.org
2021-07-14 16:05 ` redi at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-14 14:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101411
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:df115674b39d4004252b7d5e41d9751f2b77b0d8
commit r11-8739-gdf115674b39d4004252b7d5e41d9751f2b77b0d8
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Mon Jul 12 16:09:34 2021 +0100
libstdc++: Constrain std::as_writable_bytes [PR101411]
The std::as_writable_bytes function should be constrained to only accept
writable spans. Currently it can be called but then gives an error in
the function body.
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
PR libstdc++/101411
* include/std/span (as_writable_bytes): Add requires-clause.
* testsuite/23_containers/span/101411.cc: New test.
(cherry picked from commit 9d4393af9d2b37b78eb5b1f84f5d4da3a6f7fba6)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/101411] missing constraint in std::as_writable_bytes
2021-07-11 7:26 [Bug libstdc++/101411] New: missing constraint in std::as_writable_bytes hewillk at gmail dot com
` (2 preceding siblings ...)
2021-07-14 14:59 ` cvs-commit at gcc dot gnu.org
@ 2021-07-14 16:04 ` cvs-commit at gcc dot gnu.org
2021-07-14 16:05 ` redi at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-14 16:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101411
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:a34c0973c994d750fb1231da7af96038417b7fe3
commit r10-9981-ga34c0973c994d750fb1231da7af96038417b7fe3
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Mon Jul 12 16:09:34 2021 +0100
libstdc++: Constrain std::as_writable_bytes [PR101411]
The std::as_writable_bytes function should be constrained to only accept
writable spans. Currently it can be called but then gives an error in
the function body.
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
PR libstdc++/101411
* include/std/span (as_writable_bytes): Add requires-clause.
* testsuite/23_containers/span/101411.cc: New test.
(cherry picked from commit 9d4393af9d2b37b78eb5b1f84f5d4da3a6f7fba6)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/101411] missing constraint in std::as_writable_bytes
2021-07-11 7:26 [Bug libstdc++/101411] New: missing constraint in std::as_writable_bytes hewillk at gmail dot com
` (3 preceding siblings ...)
2021-07-14 16:04 ` cvs-commit at gcc dot gnu.org
@ 2021-07-14 16:05 ` redi at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2021-07-14 16:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101411
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for 10.4 and 11.2
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-07-14 16:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-11 7:26 [Bug libstdc++/101411] New: missing constraint in std::as_writable_bytes hewillk at gmail dot com
2021-07-12 17:36 ` [Bug libstdc++/101411] " cvs-commit at gcc dot gnu.org
2021-07-12 17:37 ` redi at gcc dot gnu.org
2021-07-14 14:59 ` cvs-commit at gcc dot gnu.org
2021-07-14 16:04 ` cvs-commit at gcc dot gnu.org
2021-07-14 16:05 ` redi at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).