| 1 |
// { dg-do compile { target c++17 } } |
| 2 |
|
| 3 |
#include <string_view> |
| 4 |
|
| 5 |
constexpr bool |
| 6 |
check_remove_suffix() |
| 7 |
{ |
| 8 |
std::string_view sv("123"); |
| 9 |
sv.remove_suffix(4); |
| 10 |
// { dg-error "assert_fail" "" { target *-*-* } 0 } |
| 11 |
return true; |
| 12 |
} |
| 13 |
|
| 14 |
constexpr bool test = check_remove_suffix(); |