2 // { dg-do compile { target c++20 } }
3 // { dg-options "-Wdangling-reference" }
4 // { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
9 void f(const std::vector<int>& v)
11 const int& r = std::span<const int>(v)[0]; // { dg-bogus "dangling reference" }