Debian Codegraph @

libstdc++-v3/testsuite/std/format/ranges/format_kind_neg.cc

raw
1 // { dg-do compile { target c++23 } }
2
3 // C++23 22.14.7.1 [format.range.fmtkind] p1: A program that instantiates
4 // the primary template of format_kind is ill-formed.
5
6 #include <format>
7
8 void test()
9 {
10 (void) std::format_kind<void>; // { dg-error "here" }
11 (void) std::format_kind<const void>; // { dg-error "here" }
12 (void) std::format_kind<int>; // { dg-error "here" }
13 (void) std::format_kind<int&>; // { dg-error "here" }
14 (void) std::format_kind<const int(&)[10]>; // { dg-error "here" }
15 (void) std::format_kind<void()>; // { dg-error "here" }
16 }
17
18 // { dg-error "cannot use primary template of 'std::format_kind'" "" { target *-*-* } 0 }