diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2016-05-25 09:50:46 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2016-05-25 09:50:46 +0000 |
commit | b9e551ad26b6cd4d577bf083c87e638fd83ee6fa (patch) | |
tree | 227e7d6cdabffacd98c4a39ba66811245a2fa189 /gcc | |
parent | 834f4c435552e158829d25745962d4d3564beb93 (diff) | |
download | gcc-b9e551ad26b6cd4d577bf083c87e638fd83ee6fa.zip gcc-b9e551ad26b6cd4d577bf083c87e638fd83ee6fa.tar.gz gcc-b9e551ad26b6cd4d577bf083c87e638fd83ee6fa.tar.bz2 |
re PR c++/55992 (constexpr static member function not recognised in templated using statement)
2016-05-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/55992
* g++.dg/cpp0x/alias-decl-53.C: New.
* g++.dg/cpp0x/alias-decl-54.C: Likewise.
From-SVN: r236698
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/alias-decl-53.C | 18 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/alias-decl-54.C | 15 |
3 files changed, 39 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d7a59ad..ad5f0b6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2016-05-25 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/55992 + * g++.dg/cpp0x/alias-decl-53.C: New. + * g++.dg/cpp0x/alias-decl-54.C: Likewise. + 2016-05-25 Martin Liska <mliska@suse.cz> * 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 0000000..fcb6121 --- /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<unsigned N> +struct A {}; + +template<unsigned MaxP> +struct test +{ + static constexpr unsigned pole(unsigned P) + { return P>MaxP? MaxP:P; } + + template<unsigned P> + using my_array = A<pole(P)>; + + template<unsigned P> + void do_something(my_array<P> const&, my_array<P>); +}; 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 0000000..faac4678 --- /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 <int> struct A { }; + +template <int I> +struct B +{ + static constexpr int f (int i) { return i; } + + template <int J> + using C = A<f (J)>; + + C<I> c; +}; |