gcc/testsuite/g++.dg/rtti/fn-quals.C
raw| 1 | // PR c++/48665 |
| 2 | |
| 3 | #include <typeinfo> |
| 4 | extern "C" void abort(); |
| 5 | |
| 6 | template<class A,class B> void f() { |
| 7 | if (typeid(A)==typeid(B)) abort(); // { dg-error "qualified function" } |
| 8 | if (typeid(A*)==typeid(B*)) abort(); // { dg-error "qualified function" } |
| 9 | } |
| 10 | int main() { |
| 11 | f<void()const,void()>(); |
| 12 | } |