1 /* End-to-end test of -fdiagnostics-show-template-tree and -felide-type
2    using the STL.
3    In particular, ensure that we don't print the default arguments e.g.
4    rather than printing
5      from 'vector<double,allocator<double>>' to 'vector<float,allocator<float>>'
6    (albeit with differences nicely color-coded), we want to print:
7      from 'vector<double>' to 'vector<float>'
8    (again, with the "double" and "float" highlighted, though we can't test
9    for that in this case).  */
10 
11 // { dg-options "-fdiagnostics-show-template-tree -Wno-return-type" }
12 
13 #include <map>
14 #include <vector>
15 
16 using std::vector;
17 using std::map;
18 
19 void takes_vf (vector<float> v);
20 void takes_mivf (map<int, vector<float> > v);
21 
test()22 int test ()
23 {
24   takes_vf (vector<double> ()); // { dg-error "could not convert '.*' from 'vector<double>' to 'vector<float>'" }
25   /* { dg-begin-multiline-output "" }
26   vector<
27     [double != float]>
28      { dg-end-multiline-output "" } */
29 
30   takes_mivf (map<int, vector<double> > ()); // { dg-error "could not convert '.*' from 'map<.\\.\\.\\..,vector<double>>' to 'map<.\\.\\.\\..,vector<float>>'" }
31   /* { dg-begin-multiline-output "" }
32   map<
33     [...],
34     vector<
35       [double != float]>>
36      { dg-end-multiline-output "" } */
37 }
38