From: Paolo Carlini Date: Tue, 18 Nov 2014 11:57:16 +0000 (+0000) Subject: re PR c++/60245 (function with using defined parameter not accepted as constexpr... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a6965b6517bc3fd60b5a3e1ad9accb0692376406;p=gcc.git 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 --- 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);