// { dg-do compile { target c++26 } } // { dg-skip-if "" { *-*-* } { "-fno-char8_t" } } #include void test_invalid() { std::format_parse_context pc(""); // These types are all valid: pc.check_dynamic_spec(0); // LWG 4142. check_dynamic_spec should require at least one type pc.check_dynamic_spec<>(0); // { dg-error "here" } pc.check_dynamic_spec(0); // { dg-error "here" } // const void* is allowed, but void* is not pc.check_dynamic_spec(0); // { dg-error "here" } // int and long long are allowed, but long is not pc.check_dynamic_spec(0); // { dg-error "here" } // char_type is allowed, but other character types are not pc.check_dynamic_spec(0); // { dg-error "here" } pc.check_dynamic_spec(0); // { dg-error "here" } // std::string_view is allowed, but std::string is not pc.check_dynamic_spec(0); // { dg-error "here" } // The types in the pack must be unique. pc.check_dynamic_spec(0); // { dg-error "here" } std::wformat_parse_context wpc(L""); wpc.check_dynamic_spec(0); wpc.check_dynamic_spec(0); // { dg-error "here" } wpc.check_dynamic_spec(0); // { dg-error "here" } wpc.check_dynamic_spec(0); // { dg-error "here" } } // Each failure above will trigger this static_assert: // { dg-error "allowed types" "" { target *-*-* } 0 }