Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.mike/p3524b.C

raw
1 // { dg-do assemble }
2 // Make sure we can cast to a templated type, that requires a conversion by
3 // constructor, from a derived type to a base type.
4
5 // prms-id: 3524
6
7 template <class T>
8 struct ccPair {
9 ccPair () { }
10 };
11
12 template <class T>
13 struct ccO : ccPair<T> {
14 ccO () { }
15 };
16
17 void foo ()
18 {
19 ccO<float> r;
20 (ccPair<float>)r;
21 }