diff options
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 babc55217a95..507894a2ff69 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; +} |