diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/parse/template26.C')
-rw-r--r-- | gcc/testsuite/g++.dg/parse/template26.C | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/parse/template26.C b/gcc/testsuite/g++.dg/parse/template26.C new file mode 100644 index 0000000..aab9763 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/template26.C @@ -0,0 +1,18 @@ +// PR c++/50864 + +namespace impl +{ + template <class T> T create(); +} + +template <class T, class U, __SIZE_TYPE__ + = sizeof(impl::create<T>()->*impl::create<U>())> +struct foo1; + +template <class T, class U, __SIZE_TYPE__ + = sizeof(impl::create<T>()->impl::create<U>())> // { dg-error "not a class member" } +struct foo2; + +template <class T, class U, __SIZE_TYPE__ + = sizeof(impl::create<T>().impl::create<U>())> // { dg-error "not a class member" } +struct foo3; |