Debian Codegraph @

gcc/testsuite/g++.dg/rtti/typeid2.C

raw
1 // { dg-do run }
2
3 #include <typeinfo>
4
5 template <typename T> const char *print_type (const T &) {
6 return typeid(T).name();
7 }
8
9 /* no template */ void pp1 (int) {}
10 template <typename X> void pp2 (X) {}
11
12 int main () {
13 if (print_type (&pp1) != print_type (&pp2<int>))
14 return 1;
15 }