aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/rtti/fn-quals.C
blob: 75d24f8a9f688b87923fddfd30ec1289f95b78a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// PR c++/48665

#include <typeinfo>
extern "C" void abort();

template<class A,class B> void f() {
  if (typeid(A)==typeid(B)) abort(); // { dg-error "qualified function" }
  if (typeid(A*)==typeid(B*)) abort(); // { dg-error "qualified function" }
}
int main() {
  f<void()const,void()>();
}