re PR c++/60245 (function with using defined parameter not accepted as constexpr...
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 18 Nov 2014 11:57:16 +0000 (11:57 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 18 Nov 2014 11:57:16 +0000 (11:57 +0000)
2014-11-18  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/60245
* g++.dg/cpp0x/constexpr-60245.C: New.

From-SVN: r217709

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-60245.C [new file with mode: 0644]

index f677becd88b09687f24b337e5b5b68277aff9aa0..5abda800beb7dd1b8ebe1b3531df48fbdf801981 100644 (file)
@@ -1,3 +1,8 @@
+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
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-60245.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-60245.C
new file mode 100644 (file)
index 0000000..803a229
--- /dev/null
@@ -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);