diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-23 14:22:18 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-23 14:22:18 +0000 |
commit | 73490b890977362d28dd6326843a1ecae413921d (patch) | |
tree | 3fdd91eae574e32453a4baf462961c742df2691a /test/SemaCXX/static-cast.cpp | |
parent | a5f348eb914e67b51914117fac117c18c1f8d650 (diff) |
Notes
Diffstat (limited to 'test/SemaCXX/static-cast.cpp')
-rw-r--r-- | test/SemaCXX/static-cast.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/static-cast.cpp b/test/SemaCXX/static-cast.cpp index 8db8e33b93ce1..d816c05e3ee37 100644 --- a/test/SemaCXX/static-cast.cpp +++ b/test/SemaCXX/static-cast.cpp @@ -133,3 +133,14 @@ void t_529_9() (void)static_cast<int A::*>((int H::*)0); // expected-error {{ambiguous conversion from pointer to member of derived class 'struct H'}} (void)static_cast<int A::*>((int F::*)0); // expected-error {{conversion from pointer to member of class 'struct F'}} } + +// PR 5261 - static_cast should instantiate template if possible +namespace pr5261 { + struct base {}; + template<typename E> struct derived : public base {}; + template<typename E> struct outer { + base *pb; + ~outer() { (void)static_cast<derived<E>*>(pb); } + }; + outer<int> EntryList; +} |