diff options
Diffstat (limited to 'test/SemaTemplate/default-expr-arguments.cpp')
-rw-r--r-- | test/SemaTemplate/default-expr-arguments.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/SemaTemplate/default-expr-arguments.cpp b/test/SemaTemplate/default-expr-arguments.cpp index 40b7f2b3cf..7c3525a1fb 100644 --- a/test/SemaTemplate/default-expr-arguments.cpp +++ b/test/SemaTemplate/default-expr-arguments.cpp @@ -188,3 +188,21 @@ template<> void f4<int>(int, int); void f4_test(int i) { f4(i); } + +// Instantiate for initialization +namespace InstForInit { + template<typename T> + struct Ptr { + typedef T* type; + Ptr(type); + }; + + template<typename T> + struct Holder { + Holder(int i, Ptr<T> ptr = 0); + }; + + void test_holder(int i) { + Holder<int> h(i); + } +}; |