gcc/testsuite/g++.dg/cpp2a/char8_t4.C
raw| 1 | // PR c++/106656 - P2513 - char8_t Compatibility and Portability Fixes |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | // [diff.cpp20.dcl] |
| 4 | |
| 5 | struct A { |
| 6 | char8_t s[10]; |
| 7 | }; |
| 8 | struct B { |
| 9 | char s[10]; |
| 10 | }; |
| 11 | |
| 12 | void f(A); |
| 13 | void f(B); |
| 14 | |
| 15 | int main() { |
| 16 | f({u8""}); // { dg-error "ambiguous" } |
| 17 | } |