Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.jason/typeid1.C

raw
1 // { dg-do compile }
2 // { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
3 #include <typeinfo>
4 #include <iostream>
5
6 struct foo { double f(int); };
7
8 int main() {
9 double f (int);
10 const std::type_info &r = typeid (f);
11 std::cout << typeid(f).name() << std::endl;
12 std::cout << typeid(foo::f).name() << std::endl; /* { dg-error "" } */
13 }