]> gcc.gnu.org Git - 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>
Wed, 14 Jul 2021 16:04:15 +0000 (17:04 +0100)
commita34c0973c994d750fb1231da7af96038417b7fe3
tree2ba9553c6c61b63bca4884cf60e82b8d6575ba1f
parentb4ebc18c055f2299e807d372fc2bda3d64aed01c
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)
libstdc++-v3/include/std/span
libstdc++-v3/testsuite/23_containers/span/101411.cc [new file with mode: 0644]
This page took 0.058941 seconds and 6 git commands to generate.