diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-05 17:18:09 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-05 17:18:09 +0000 |
commit | 8f57cb0305232cb53fff00ef151ca716766f3437 (patch) | |
tree | 8b316eca843681b024034db1125707173b9adb4a /test/SemaTemplate/instantiate-complete.cpp | |
parent | 51fb8b013e7734b795139f49d3b1f77c539be20a (diff) |
Notes
Diffstat (limited to 'test/SemaTemplate/instantiate-complete.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-complete.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-complete.cpp b/test/SemaTemplate/instantiate-complete.cpp index babc55217a95b..507894a2ff691 100644 --- a/test/SemaTemplate/instantiate-complete.cpp +++ b/test/SemaTemplate/instantiate-complete.cpp @@ -45,3 +45,24 @@ void test_memptr(X<long> *p1, long X<long>::*pm1, (void)(p1->*pm1); (void)((p2->*pm2)(0)); } + +// Reference binding to a base +template<typename T> +struct X1 { }; + +template<typename T> +struct X2 : public T { }; + +void refbind_base(X2<X1<int> > &x2) { + X1<int> &x1 = x2; +} + +// Enumerate constructors for user-defined conversion. +template<typename T> +struct X3 { + X3(T); +}; + +void enum_constructors(X1<float> &x1) { + X3<X1<float> > x3 = x1; +} |