From a6965b6517bc3fd60b5a3e1ad9accb0692376406 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 18 Nov 2014 11:57:16 +0000 Subject: [PATCH] re PR c++/60245 (function with using defined parameter not accepted as constexpr parameter) 2014-11-18 Paolo Carlini PR c++/60245 * g++.dg/cpp0x/constexpr-60245.C: New. From-SVN: r217709 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/constexpr-60245.C | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/constexpr-60245.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f677becd88b..5abda800beb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-11-18 Paolo Carlini + + PR c++/60245 + * g++.dg/cpp0x/constexpr-60245.C: New. + 2014-11-18 Paolo Carlini PR c++/60771 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 00000000000..803a2299677 --- /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); -- 2.30.2