1 // { dg-options "-fdiagnostics-show-template-tree" }
3 /* Example of default template args, and various kinds of mismatch. */
5 template <int = 0, int = 1, int = 2>
9 void takes_s013 (s<0, 1, 3> );
10 void takes_s321 (s<3, 2, 1> );
16 takes_s (s<0, 1, 2>());
17 takes_s (s<0, 2>()); // { dg-error "could not convert '.*' from 's<.\\.\\.\\..,2>' to 's<.\\.\\.\\..,1>'" }
18 /* { dg-begin-multiline-output "" }
22 { dg-end-multiline-output "" } */
24 takes_s (s<1>()); // { dg-error "could not convert '.*' from 's<1>' to 's<0>'" }
25 /* { dg-begin-multiline-output "" }
28 { dg-end-multiline-output "" } */
30 takes_s (s<0, 1, 3>()); // { dg-error "could not convert '.*' from 's<.\\.\\.\\..,.\\.\\.\\..,3>' to 's<.\\.\\.\\..,.\\.\\.\\..,2>'" }
31 /* { dg-begin-multiline-output "" }
36 { dg-end-multiline-output "" } */
38 takes_s (s<3, 2, 0>()); // { dg-error "could not convert '.*' from 's<3,2,0>' to 's<0,1,2>'" }
39 /* { dg-begin-multiline-output "" }
44 { dg-end-multiline-output "" } */
46 takes_s (s<3, 2, 1>()); // { dg-error "could not convert '.*' from 's<3,2,1>' to 's<0,1,2>'" }
47 /* { dg-begin-multiline-output "" }
52 { dg-end-multiline-output "" } */
54 takes_s013 (s<0, 1, 2>()); // { dg-error "could not convert '.*' from 's<.\\.\\.\\..,.\\.\\.\\..,2>' to 's<.\\.\\.\\..,.\\.\\.\\..,3>'" }
55 /* { dg-begin-multiline-output "" }
60 { dg-end-multiline-output "" } */
62 takes_s321 (s<>()); // { dg-error "could not convert '.*' from 's<0,1,2>' to 's<3,2,1>'" }
63 /* { dg-begin-multiline-output "" }
68 { dg-end-multiline-output "" } */
70 takes_s321 (s<0, 1, 3>()); // { dg-error "could not convert '.*' from 's<0,1,3>' to 's<3,2,1>'" }
71 /* { dg-begin-multiline-output "" }
76 { dg-end-multiline-output "" } */
78 takes_s321 (s<3, 2, 0>()); // { dg-error "could not convert '.*' from 's<.\\.\\.\\..,.\\.\\.\\..,0>' to 's<.\\.\\.\\..,.\\.\\.\\..,1>'" }
79 /* { dg-begin-multiline-output "" }
84 { dg-end-multiline-output "" } */
86 takes_s321 (s<3, 2, 1>());
88 takes_s321 (s<1, 2, 3>()); // { dg-error "could not convert '.*' from 's<1,.\\.\\.\\..,3>' to 's<3,.\\.\\.\\..,1>'" }
89 /* { dg-begin-multiline-output "" }
94 { dg-end-multiline-output "" } */