]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Constrain std::as_writable_bytes [PR101411]
authorJonathan Wakely <jwakely@redhat.com>
Mon, 12 Jul 2021 15:09:34 +0000 (16:09 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 12 Jul 2021 17:35:27 +0000 (18:35 +0100)
commit9d4393af9d2b37b78eb5b1f84f5d4da3a6f7fba6
tree2a130a418f2583104f5ea1523714780cc200cf26
parent3f2338b4706cdc53ab276b9a5fed7f6927404f07
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.
libstdc++-v3/include/std/span
libstdc++-v3/testsuite/23_containers/span/101411.cc [new file with mode: 0644]