libstdc++-v3/testsuite/23_containers/span/101411.cc
raw| 1 | // { dg-do compile { target c++20 } } |
| 2 | #include <span> |
| 3 | |
| 4 | // PR libstdc++/101411 |
| 5 | |
| 6 | void f(std::span<const int> s) |
| 7 | { |
| 8 | std::as_writable_bytes(s); // { dg-error "no matching function" } |
| 9 | } |
| 10 | |
| 11 | void f1(std::span<const int, 1> s) |
| 12 | { |
| 13 | std::as_writable_bytes(s); // { dg-error "no matching function" } |
| 14 | } |