diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-04 15:04:32 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-04 15:04:32 +0000 |
commit | 51fb8b013e7734b795139f49d3b1f77c539be20a (patch) | |
tree | 59e0e47a9831dcf0e21e547927c8ebb7e113bfd1 /test/SemaTemplate/default-expr-arguments.cpp | |
parent | 73490b890977362d28dd6326843a1ecae413921d (diff) |
Notes
Diffstat (limited to 'test/SemaTemplate/default-expr-arguments.cpp')
-rw-r--r-- | test/SemaTemplate/default-expr-arguments.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/SemaTemplate/default-expr-arguments.cpp b/test/SemaTemplate/default-expr-arguments.cpp index 575283ed8b513..9c0f1ecf0c3b7 100644 --- a/test/SemaTemplate/default-expr-arguments.cpp +++ b/test/SemaTemplate/default-expr-arguments.cpp @@ -84,3 +84,27 @@ struct X1 { void test_X1() { X1<int> x1; } + +// PR5283 +namespace PR5283 { +template<typename T> struct A { + A(T = 1); // expected-error 3 {{incompatible type initializing 'int', expected 'int *'}} +}; + +struct B : A<int*> { + B(); +}; +B::B() { } // expected-note {{in instantiation of default function argument expression for 'A<int *>' required he}} + +struct C : virtual A<int*> { + C(); +}; +C::C() { } // expected-note {{in instantiation of default function argument expression for 'A<int *>' required he}} + +struct D { + D(); + + A<int*> a; +}; +D::D() { } // expected-note {{in instantiation of default function argument expression for 'A<int *>' required he}} +} |