diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/sizeof4.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/sizeof4.C | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/sizeof4.C b/gcc/testsuite/g++.dg/template/sizeof4.C new file mode 100644 index 000000000..4856a2741 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/sizeof4.C @@ -0,0 +1,18 @@ +// { dg-do compile } +// Origin: <anthwil at nortelnetworks dot com> +// c++/4933: using sizeof with comma operator as template argument + +template<unsigned F> +struct Foo {}; + +template<typename T> +T makeT(); + +template<typename T,typename U> +struct Bar +{ + typedef Foo + < + sizeof((makeT<T>(), makeT<U>())) + > Type; +}; |