PR c++/65075
* constexpr.c (check_constexpr_bind_expr_vars): Allow
implicit typedefs for lambda types.
* g++.dg/cpp0x/pr65075.C: New test.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r220748
+2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/65075
+ * constexpr.c (check_constexpr_bind_expr_vars): Allow
+ implicit typedefs for lambda types.
+
2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60894
for (tree var = BIND_EXPR_VARS (t); var; var = DECL_CHAIN (var))
if (TREE_CODE (var) == TYPE_DECL
- && DECL_IMPLICIT_TYPEDEF_P (var))
+ && DECL_IMPLICIT_TYPEDEF_P (var)
+ && !LAMBDA_TYPE_P (TREE_TYPE (var)))
return false;
return true;
}
+2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/65075
+ * g++.dg/cpp0x/pr65075.C: New test.
+
2015-02-16 David Edelsohn <dje.gcc@gmail.com>
PR target/65058
--- /dev/null
+// PR c++/65075
+// { dg-do compile { target c++11 } }
+
+typedef void (*E) ();
+template <class T>
+constexpr E
+bar (bool a)
+{
+ return a ? []() {} : []() {};
+}
+
+void
+foo ()
+{
+ (bar<int> (false)) ();
+ (bar<int> (true)) ();
+}