Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.other/cast7.C

raw
1 // { dg-do run }
2 // Test that we can add cv-quals in a static cast to a pointer-to-base type.
3
4 struct A { int i; };
5 struct B : public A {};
6
7 int main()
8 {
9 int B::* bp = &B::i;
10 const int A::* ap = static_cast<const int A::*>(bp);
11 return ap != bp;
12 }