libstdc++-v3/testsuite/std/format/string_neg.cc
raw| 1 | // { dg-do compile { target c++20 } } |
| 2 | |
| 3 | #include <format> |
| 4 | |
| 5 | auto s = std::format(" {9} "); // { dg-error "call to consteval function" } |
| 6 | // { dg-error "invalid.arg.id" "" { target *-*-* } 0 } |
| 7 | |
| 8 | struct X { }; |
| 9 | std::format_string<X> str(""); // { dg-error "here" } |
| 10 | // { dg-error "std::formatter must be specialized" "" { target *-*-* } 0 } |