diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2014-11-18 11:57:16 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2014-11-18 11:57:16 +0000 |
commit | a6965b6517bc3fd60b5a3e1ad9accb0692376406 (patch) | |
tree | dbb8af896a8b82c95a4ae20400b7f80d27fc997b /gcc | |
parent | 6e9394078acee8a1304ac9df80f8a509ffb4c356 (diff) | |
download | gcc-a6965b6517bc3fd60b5a3e1ad9accb0692376406.zip gcc-a6965b6517bc3fd60b5a3e1ad9accb0692376406.tar.gz gcc-a6965b6517bc3fd60b5a3e1ad9accb0692376406.tar.bz2 |
re PR c++/60245 (function with using defined parameter not accepted as constexpr parameter)
2014-11-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60245
* g++.dg/cpp0x/constexpr-60245.C: New.
From-SVN: r217709
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-60245.C | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f677bec..5abda80 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2014-11-18 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/60245 + * g++.dg/cpp0x/constexpr-60245.C: New. + +2014-11-18 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/60771 * g++.dg/cpp0x/constexpr-ref6.C: New. diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-60245.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-60245.C new file mode 100644 index 0000000..803a229 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-60245.C @@ -0,0 +1,8 @@ +// PR c++/60245 +// { dg-do compile { target c++11 } } + +constexpr int Apply(const int in, int (*f)(const int&)) { return f(in); } + +using Foo = int; +static constexpr int id(const Foo& i) { return i; } +static constexpr int results1 = Apply(0, &id); |