/* End-to-end test of -fdiagnostics-show-template-tree and -felide-type using the STL. In particular, ensure that we don't print the default arguments e.g. rather than printing from 'vector>' to 'vector>' (albeit with differences nicely color-coded), we want to print: from 'vector' to 'vector' (again, with the "double" and "float" highlighted, though we can't test for that in this case). */ // { dg-options "-fdiagnostics-show-template-tree" } #include #include using std::vector; using std::map; void takes_vf (vector v); void takes_mivf (map > v); int test () { takes_vf (vector ()); // { dg-error "could not convert '.*' from 'vector' to 'vector'" } /* { dg-begin-multiline-output "" } vector< [double != float]> { dg-end-multiline-output "" } */ takes_mivf (map > ()); // { dg-error "could not convert '.*' from 'map<.\\.\\.\\..,vector>' to 'map<.\\.\\.\\..,vector>'" } /* { dg-begin-multiline-output "" } map< [...], vector< [double != float]>> { dg-end-multiline-output "" } */ }