From: Paolo Carlini Date: Wed, 25 May 2016 09:50:46 +0000 (+0000) Subject: re PR c++/55992 (constexpr static member function not recognised in templated using... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b9e551ad26b6cd4d577bf083c87e638fd83ee6fa;p=gcc.git re PR c++/55992 (constexpr static member function not recognised in templated using statement) 2016-05-25 Paolo Carlini PR c++/55992 * g++.dg/cpp0x/alias-decl-53.C: New. * g++.dg/cpp0x/alias-decl-54.C: Likewise. From-SVN: r236698 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d7a59ad54ce..ad5f0b66a79 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2016-05-25 Paolo Carlini + + PR c++/55992 + * g++.dg/cpp0x/alias-decl-53.C: New. + * g++.dg/cpp0x/alias-decl-54.C: Likewise. + 2016-05-25 Martin Liska * g++.dg/pr71239.C: New test. diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-53.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-53.C new file mode 100644 index 00000000000..fcb6121f2b0 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-53.C @@ -0,0 +1,18 @@ +// PR c++/55992 +// { dg-do compile { target c++11 } } + +template +struct A {}; + +template +struct test +{ + static constexpr unsigned pole(unsigned P) + { return P>MaxP? MaxP:P; } + + template + using my_array = A; + + template + void do_something(my_array

const&, my_array

); +}; diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-54.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-54.C new file mode 100644 index 00000000000..faac46782dd --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-54.C @@ -0,0 +1,15 @@ +// PR c++/55992 +// { dg-do compile { target c++11 } } + +template struct A { }; + +template +struct B +{ + static constexpr int f (int i) { return i; } + + template + using C = A; + + C c; +};